Instructions to use Raghav-Singhal/1pp-2.81b-v2-spp-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Raghav-Singhal/1pp-2.81b-v2-spp-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Raghav-Singhal/1pp-2.81b-v2-spp-base") 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/1pp-2.81b-v2-spp-base") model = AutoModelForCausalLM.from_pretrained("Raghav-Singhal/1pp-2.81b-v2-spp-base", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Raghav-Singhal/1pp-2.81b-v2-spp-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Raghav-Singhal/1pp-2.81b-v2-spp-base" # 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/1pp-2.81b-v2-spp-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Raghav-Singhal/1pp-2.81b-v2-spp-base
- SGLang
How to use Raghav-Singhal/1pp-2.81b-v2-spp-base 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/1pp-2.81b-v2-spp-base" \ --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/1pp-2.81b-v2-spp-base", "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/1pp-2.81b-v2-spp-base" \ --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/1pp-2.81b-v2-spp-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Raghav-Singhal/1pp-2.81b-v2-spp-base with Docker Model Runner:
docker model run hf.co/Raghav-Singhal/1pp-2.81b-v2-spp-base
1pp-2.81b-v2-spp-base
SPP{T0} baseline of the One Persona Pretraining (1PP) scaling ladder: 2.81B parameters, seed 28.
The SPP{T0} and Filtered conditions redo two baselines of the SPP paper on the 1PP raw corpus (the original DCLM-edu documents). Both read exactly the raw run's documents in the raw run's order, for the same number of steps with the same schedule; compare with the raw model 1pp-2.81b-v2-raw-base. A safety classifier (gte-based, scored per chunk) flagged 3,869,498 documents (4.6%) whose highest chunk score is at least 3. Models are grouped in the 1pp collection.
What SPP{T0} changes
7,738,994 documents (every flagged document plus an equal number of random unflagged ones) carry a first-person reflection written by the SPP{T0} reflection model, inserted inside the document at a position that model chose: the marker token <assistant> (id 49153), then the reflection (at most 256 tokens), then the rest of the document. The model is trained on the reflection tokens but not on the marker. The document text after a reflection cannot attend to it (SPP's attention mask), so the document is modeled as if the reflection were absent. The added tokens push some documents a step or two later than in the raw run; 1,289 of 80.9M documents fell off the end of a data half and were not trained.
Using it: the vocabulary is SmolLM2's 49,152 tokens plus <|pad|> (49152) and <assistant> (49153). Appending <assistant> after document text makes the model write a reflection; no token marks a reflection's end. Hugging Face's standard causal attention lets text after a reflection see it, which training never did.
Architecture
Llama-style decoder, 24 layers, hidden 2,688, FFN 10,752 (SwiGLU), attention heads / KV heads 21 / 7 (head dim 128), RMSNorm, RoPE base 10,000, untied embeddings, no biases, no QK-norm, sequence length 4,096. Tokenizer: SmolLM2 vocabulary (49,152) plus <|pad|> and the SPP marker <assistant>; <|endoftext|> is the end-of-document token.
Pretraining
53,709 steps of the raw run's step-aligned stream (112.64B token positions), global batch 512 ร 4,096 tokens, cross-document attention masking. Optimizer: Muon (shape scaling, matrix LR 0.005) with Adam for the other parameters (LR 1.29e-3 for embeddings and the output layer, 3e-3 for norms); warmup 3,378 steps, constant, linear decay over the last 5,370 steps to 1/100; weight decay 0.1; init std 0.0078; bf16. Same settings as the raw model at this size.
Validation loss of the base model (per token, 2,433 held-out documents and the conversations rewritten from them, final checkpoint):
| document text | assistant text | user text |
|---|---|---|
| 2.306 | 2.474 | 2.822 |
Chat format
SPP chat form (the marker <assistant>, id 49153, opens each assistant turn; no newline after it) without a system turn:
<|im_start|>user\n{message}<|im_end|>\n<|im_start|><assistant>{reply}<|im_end|>\n
The bundled chat_template (in tokenizer_config.json and chat_template.jinja) renders exactly this, and the generation prompt ends with <|im_start|><assistant>.
Generation stops at <|im_end|> (id 2) or <|endoftext|> (id 0). This is a base model trained on documents; it produces plain text, and the chat template is there so prompts match the SPP{T0} SFT models.
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("Raghav-Singhal/1pp-2.81b-v2-spp-base")
model = AutoModelForCausalLM.from_pretrained("Raghav-Singhal/1pp-2.81b-v2-spp-base", torch_dtype="bfloat16")
ids = tok.apply_chat_template([{"role": "user", "content": "Who are you?"}], add_generation_prompt=True, return_tensors="pt")
# ids encode: <|im_start|>user\nWho are you?<|im_end|>\n<|im_start|><assistant>
out = model.generate(ids, max_new_tokens=200) # stops at <|im_end|>
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
Verification
The HF weights were checked against the Megatron checkpoint by recomputing validation losses with this model:
| set | HF loss | Megatron reference | abs. diff |
|---|---|---|---|
| val50m segments [3] | 2.4721 | 2.4736 | 0.0015 |
| raw_val50m segments [8] | 2.3080 | 2.3061 | 0.0019 |
Links
- Training logs: wandb projects 1pp-training and 1pp-sft
- Research artifact from the 1PP project (EPFL DLAB); not a general-purpose assistant.
- Downloads last month
- 27