How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="Raghav-Singhal/pathlang-1p7b-runB-en-first")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("Raghav-Singhal/pathlang-1p7b-runB-en-first")
model = AutoModelForCausalLM.from_pretrained("Raghav-Singhal/pathlang-1p7b-runB-en-first", 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=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

pathlang-1p7b-runB-en-first

A 1.7B-parameter bilingual (English + Chinese) language model, part of a controlled language-ordering study. Three models share the same architecture, initialization, total data diet (50B English + 50B Chinese = 100B tokens), and LR schedule; they differ only in the order in which the two languages are presented during pretraining. This is the English-first run.

Curriculum (this run)

  • Phase 1 (0-30B): 100% English
  • Phase 2 (30-90B): 75% Chinese / 25% English
  • Phase 3 (90-100B): 50/50

The other runs in the study: Raghav-Singhal/pathlang-1p7b-runA-zh-first, Raghav-Singhal/pathlang-1p7b-runB-en-first, Raghav-Singhal/pathlang-1p7b-runC-5050.

Architecture

  • SmolLM2-1.7B backbone: 24 layers, hidden size 2048, FFN 8192, 32 attention heads
  • RoPE (base 10000), RMSNorm, SwiGLU, no biases, sequence length 2048
  • Tokenizer: Qwen3 (multilingual, vocab 151,936)
  • ~2.1B total parameters (with the Qwen3 embedding)

Training

  • 100B tokens: 50B English (DCLM-edu) + 50B Chinese (FineWeb-2 cmn_Hani)
  • Global batch size 960, sequence length 2048, 50,860 steps
  • WSD LR schedule (peak 2e-4, 2000 warmup, linear decay over the final 10B tokens), bf16, Adam
  • Converted from Megatron-LM to HF LlamaForCausalLM format

Held-out validation loss (final checkpoint, 100B tokens)

English val Chinese val
this run (English-first) 2.657 2.429

Cross-entropy in nats/token on held-out blocks of the training corpora. The headline finding of the study: each run ends best at the language that dominated its middle (bulk) phase — a recency effect that also holds on an out-of-distribution corpus (HPLT4.0).

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained("Raghav-Singhal/pathlang-1p7b-runB-en-first")
tok = AutoTokenizer.from_pretrained("Raghav-Singhal/pathlang-1p7b-runB-en-first")

Note

License is set to other pending confirmation; the training data (DCLM-edu, FineWeb-2) and their respective terms apply. This is a base (non-instruction-tuned) research checkpoint.

Downloads last month
8
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support