Instructions to use dlab-spp/t0-mt-1.7b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dlab-spp/t0-mt-1.7b-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dlab-spp/t0-mt-1.7b-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dlab-spp/t0-mt-1.7b-instruct") model = AutoModelForCausalLM.from_pretrained("dlab-spp/t0-mt-1.7b-instruct", 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-mt-1.7b-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dlab-spp/t0-mt-1.7b-instruct" # 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-mt-1.7b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dlab-spp/t0-mt-1.7b-instruct
- SGLang
How to use dlab-spp/t0-mt-1.7b-instruct 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-mt-1.7b-instruct" \ --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-mt-1.7b-instruct", "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-mt-1.7b-instruct" \ --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-mt-1.7b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dlab-spp/t0-mt-1.7b-instruct with Docker Model Runner:
docker model run hf.co/dlab-spp/t0-mt-1.7b-instruct
SPP-T0-MT โ Instruct (1.7B)
Type: instruction-tuned model (base model + persona-binding supervised fine-tuning).
Trained with SPP from token zero plus reflection-focused midtraining, then post-trained with persona-binding SFT.
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.
Base counterpart: dlab-spp/t0-mt-1.7b-base.
Model details
- Architecture: SmolLM2-1.7B architecture, trained from scratch.
- Tokenizer: SmolLM2 tokenizer with an added
<assistant>marker token (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, followed by a reflection-focused midtraining stage on those annotated documents.
- Post-training: persona-binding supervised fine-tuning (PBSFT-mix): 300k single-turn examples, 90% WildChat-1M instructions and 10% safety prompts (WildJailbreak, WildGuardMix); assistant responses follow a constitution with inline
[N.M]citations; response-only loss, one epoch.
Chat format
There is no system prompt. Each assistant turn opens with <|im_start|><assistant>. Use the built-in chat template:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
repo = "dlab-spp/t0-mt-1.7b-instruct"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype=torch.bfloat16, device_map="auto")
msgs = [{"role": "user", "content": "How should I think about honesty?"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=512)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=False))
Intended use
Research on alignment and safety (constitutional alignment, value generalization, jailbreak robustness). A research artifact, not a production model; it can produce incorrect or unsafe content.
Links
- Paper: to be released
License: to be finalised.
- Downloads last month
- -