Instructions to use Raghav-Singhal/pathlang-1p7b-runE-en30-zh70 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Raghav-Singhal/pathlang-1p7b-runE-en30-zh70 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Raghav-Singhal/pathlang-1p7b-runE-en30-zh70") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Raghav-Singhal/pathlang-1p7b-runE-en30-zh70") model = AutoModelForCausalLM.from_pretrained("Raghav-Singhal/pathlang-1p7b-runE-en30-zh70", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Raghav-Singhal/pathlang-1p7b-runE-en30-zh70 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Raghav-Singhal/pathlang-1p7b-runE-en30-zh70" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Raghav-Singhal/pathlang-1p7b-runE-en30-zh70", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Raghav-Singhal/pathlang-1p7b-runE-en30-zh70
- SGLang
How to use Raghav-Singhal/pathlang-1p7b-runE-en30-zh70 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Raghav-Singhal/pathlang-1p7b-runE-en30-zh70" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Raghav-Singhal/pathlang-1p7b-runE-en30-zh70", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Raghav-Singhal/pathlang-1p7b-runE-en30-zh70" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Raghav-Singhal/pathlang-1p7b-runE-en30-zh70", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Raghav-Singhal/pathlang-1p7b-runE-en30-zh70 with Docker Model Runner:
docker model run hf.co/Raghav-Singhal/pathlang-1p7b-runE-en30-zh70
pathlang-1p7b-runE-en30-zh70
A 1.7B-parameter bilingual (English + Chinese) language model trained with a purely sequential
monolingual curriculum: all of one language, then all of the other. This is the English-first sequential (en30->zh70) run, part
of a controlled language-ordering study. Companion blended-curriculum runs (50/50 diet, 3-phase) live at
Raghav-Singhal/pathlang-1p7b-runA-zh-first, -runB-en-first, -runC-5050.
Curriculum (this run)
- Phase 1 (0-30B): 100% English
- Phase 2 (30-100B): 100% Chinese
The mirror run is Raghav-Singhal/pathlang-1p7b-runD-zh30-en70.
Architecture
- SmolLM2-1.7B backbone: 24 layers, hidden 2048, FFN 8192, 32 heads, RoPE (base 10000), RMSNorm, SwiGLU, seq len 2048
- Tokenizer: Qwen3 (multilingual, vocab 151,936); ~2.1B total params
- Converted from Megatron-LM to HF
LlamaForCausalLM
Training
- 100B tokens total, global batch size 960, 50,860 steps
- WSD LR schedule (peak 2e-4, 2000 warmup, linear decay over the final 10B tokens), bf16, Adam
- English: DCLM-edu. Chinese: FineWeb-2 hq-mmbert quality_33 (
cmn_Hani) — a larger slice than the quality_10 used by the A/B/C runs, needed for the 70B Chinese phase.
Held-out validation loss (final checkpoint, 100B tokens)
| English val | Chinese val | |
|---|---|---|
| this run (English-first sequential (en30->zh70)) | 3.997 | 2.531 |
In-loop 128-seq probe, cross-entropy nats/token, on this study's held-out blocks (comparable within the D/E pair). Key finding — catastrophic forgetting under sequential training: the model ends excellent at its second (70B) language and substantially degraded at the first, abandoned one. E.g. this run's first-phase language rose from ~2.7 loss at the 30B switch to the value above by 100B — much sharper forgetting than the blended A/B runs, which retained 25% of the earlier language throughout.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained("Raghav-Singhal/pathlang-1p7b-runE-en30-zh70")
tok = AutoTokenizer.from_pretrained("Raghav-Singhal/pathlang-1p7b-runE-en30-zh70")
Note
License other pending confirmation; DCLM-edu and FineWeb-2 terms apply. Base (non-instruction-tuned)
research checkpoint.
- Downloads last month
- 124