Text Generation
Transformers
Safetensors
English
llama
spp
synthetic-persona-pretraining
alignment
safety
conversational
text-generation-inference
Instructions to use dlab-spp/mt-3b-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dlab-spp/mt-3b-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dlab-spp/mt-3b-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("dlab-spp/mt-3b-base") model = AutoModelForCausalLM.from_pretrained("dlab-spp/mt-3b-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 dlab-spp/mt-3b-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dlab-spp/mt-3b-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/mt-3b-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dlab-spp/mt-3b-base
- SGLang
How to use dlab-spp/mt-3b-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/mt-3b-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/mt-3b-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/mt-3b-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/mt-3b-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dlab-spp/mt-3b-base with Docker Model Runner:
docker model run hf.co/dlab-spp/mt-3b-base
Model card: name revisions by global training step
Browse files
README.md
CHANGED
|
@@ -37,23 +37,33 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
| 37 |
import torch
|
| 38 |
|
| 39 |
repo = "dlab-spp/mt-3b-base"
|
| 40 |
-
tok = AutoTokenizer.from_pretrained(repo
|
| 41 |
model = AutoModelForCausalLM.from_pretrained(
|
| 42 |
-
repo, revision="step-
|
| 43 |
)
|
| 44 |
```
|
| 45 |
|
| 46 |
-
| Revision | Midtraining step | LR phase |
|
| 47 |
-
|---|---|---|
|
| 48 |
-
| `step-
|
| 49 |
-
| `step-
|
| 50 |
-
| `step-
|
| 51 |
-
| `step-
|
| 52 |
-
|
| 53 |
-
`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
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.
|
| 55 |
|
| 56 |
-
|
|
|
|
|
|
|
| 57 |
|
| 58 |
## Intended use
|
| 59 |
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.
|
|
|
|
| 37 |
import torch
|
| 38 |
|
| 39 |
repo = "dlab-spp/mt-3b-base"
|
| 40 |
+
tok = AutoTokenizer.from_pretrained(repo, revision="step-225000")
|
| 41 |
model = AutoModelForCausalLM.from_pretrained(
|
| 42 |
+
repo, revision="step-225000", dtype=torch.bfloat16, device_map="auto"
|
| 43 |
)
|
| 44 |
```
|
| 45 |
|
| 46 |
+
| Revision | Stage | Tokens seen | Midtraining step | LR phase |
|
| 47 |
+
|---|---|---|---|---|
|
| 48 |
+
| `step-25000` | pretraining | ~49.2B | β | stable |
|
| 49 |
+
| `step-50000` | pretraining | ~98.3B | β | stable |
|
| 50 |
+
| `step-75000` | pretraining | ~147B | β | stable |
|
| 51 |
+
| `step-100000` | pretraining | ~197B | β | stable |
|
| 52 |
+
| `step-125000` | pretraining | ~246B | β | stable |
|
| 53 |
+
| `step-150000` | pretraining | ~295B | β | stable |
|
| 54 |
+
| `step-175000` | pretraining | ~344B | β | stable |
|
| 55 |
+
| `step-200000` | pretraining | ~393B | β | stable |
|
| 56 |
+
| `step-225000` | midtraining start | ~442B | 0 / 72,895 | β |
|
| 57 |
+
| `step-250000` | midtraining | β | 25,000 / 72,895 | linear decay |
|
| 58 |
+
| `step-275000` | midtraining | β | 50,000 / 72,895 | linear decay |
|
| 59 |
+
| `step-297895` | midtraining | β | 72,895 / 72,895 | linear decay β same weights as `main` |
|
| 60 |
+
|
| 61 |
+
`main` always holds the finished model (step 297,895).
|
| 62 |
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.
|
| 63 |
|
| 64 |
+
Revisions are named by global training step. Up to `step-225000` this is the pretraining run of [`dlab-spp/vanilla-3b-base`](https://huggingface.co/dlab-spp/vanilla-3b-base), and those revisions have the same weights as the revisions of the same name there. Midtraining started from [`dlab-spp/vanilla-3b-base`](https://huggingface.co/dlab-spp/vanilla-3b-base) `step-225000` with the vocabulary extended to 49,280 rows and ran 72,895 more steps, replacing the final learning-rate cooldown. The cooldown revisions of [`dlab-spp/vanilla-3b-base`](https://huggingface.co/dlab-spp/vanilla-3b-base) (`step-240000`, `step-254313`) are not part of this model's training history.
|
| 65 |
+
|
| 66 |
+
Revisions up to `step-200000` are vanilla pretraining checkpoints and ship the vanilla tokenizer (vocabulary 49,152; same BPE vocabulary and merges, without `<assistant>` and the constitution tokens), so each revision runs with its own tokenizer. Load the tokenizer with the same `revision=` as the weights.
|
| 67 |
|
| 68 |
## Intended use
|
| 69 |
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.
|