Instructions to use dlab-spp/t0-1.7b-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dlab-spp/t0-1.7b-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dlab-spp/t0-1.7b-base") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dlab-spp/t0-1.7b-base") model = AutoModelForCausalLM.from_pretrained("dlab-spp/t0-1.7b-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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dlab-spp/t0-1.7b-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dlab-spp/t0-1.7b-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": "dlab-spp/t0-1.7b-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dlab-spp/t0-1.7b-base
- SGLang
How to use dlab-spp/t0-1.7b-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 "dlab-spp/t0-1.7b-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": "dlab-spp/t0-1.7b-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 "dlab-spp/t0-1.7b-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": "dlab-spp/t0-1.7b-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dlab-spp/t0-1.7b-base with Docker Model Runner:
docker model run hf.co/dlab-spp/t0-1.7b-base
SPP-T0 โ Base (1.7B)
Type: base (pretrained) model. Not instruction-tuned and ships no chat template.
Trained with Synthetic Persona Pretraining (SPP) from token zero: first-person reflections are inserted into the roughly 10% of annotated documents that carry one, throughout the entire pretraining run.
Synthetic Persona Pretraining (SPP)
Synthetic Persona Pretraining (SPP) installs a target value persona during pretraining rather than only during alignment. Value-laden, first-person reflections, generated against a constitution, are appended to a subset of pretraining documents after a special <assistant> token. Attention masking and RoPE position aliasing keep the reflection from changing the continuation of the original document. This model is trained with SPP.
Instruction-tuned counterpart: dlab-spp/t0-1.7b-instruct.
Model details
- Architecture: SmolLM2-1.7B architecture, trained from scratch.
- Tokenizer: the SmolLM2 tokenizer extended with an
<assistant>marker and constitution tokens (vocabulary 49280). - Pretraining: ~100B tokens on a subset of the Olmo 3 Dolma 3 mixture, with SPP reflections inserted into the safety-annotated documents within it.
Training checkpoints
Intermediate checkpoints are published as git revisions on this repo, so any point in the trajectory can be loaded by passing revision=:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
repo = "dlab-spp/t0-1.7b-base"
tok = AutoTokenizer.from_pretrained(repo) # identical at every revision
model = AutoModelForCausalLM.from_pretrained(
repo, revision="step-5000", dtype=torch.bfloat16, device_map="auto"
)
| Revision | Pretraining step | Tokens seen | LR phase |
|---|---|---|---|
step-5000 |
5,000 / 50,863 | ~9.8B | stable |
step-10000 |
10,000 / 50,863 | ~19.7B | stable |
step-15000 |
15,000 / 50,863 | ~29.5B | stable |
step-20000 |
20,000 / 50,863 | ~39.3B | stable |
step-25000 |
25,000 / 50,863 | ~49.2B | stable |
step-30000 |
30,000 / 50,863 | ~59.0B | stable |
step-35000 |
35,000 / 50,863 | ~68.8B | stable |
step-40000 |
40,000 / 50,863 | ~78.6B | stable |
step-45000 |
45,000 / 50,863 | ~88.5B | stable |
step-50863 |
50,863 / 50,863 | ~100B | linear decay โ same weights as main |
main always holds the finished model (step 50,863).
Only model weights are published โ optimizer and RNG state are not included, so these revisions support evaluation, probing, and fine-tuning, but not exact resumption of the original run.
Intended use
Research on alignment and safety. As a base model it is meant for continuation, probing, or further fine-tuning; it is not instruction-tuned and can produce incorrect or unsafe content.
Links
- Paper: to be released
License: to be finalised.
- Downloads last month
- -