Text Generation
Transformers
Safetensors
English
Chinese
qwen3
base-model
pretraining
fully-open
open-recipe
fp8
rtx-5090
conversational
text-generation-inference
Instructions to use thu-pacman/Puro-2B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thu-pacman/Puro-2B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thu-pacman/Puro-2B-Base") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("thu-pacman/Puro-2B-Base") model = AutoModelForCausalLM.from_pretrained("thu-pacman/Puro-2B-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 thu-pacman/Puro-2B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thu-pacman/Puro-2B-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": "thu-pacman/Puro-2B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thu-pacman/Puro-2B-Base
- SGLang
How to use thu-pacman/Puro-2B-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 "thu-pacman/Puro-2B-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": "thu-pacman/Puro-2B-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 "thu-pacman/Puro-2B-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": "thu-pacman/Puro-2B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use thu-pacman/Puro-2B-Base with Docker Model Runner:
docker model run hf.co/thu-pacman/Puro-2B-Base
Upload folder using huggingface_hub
Browse files- README.md +135 -0
- config.json +63 -0
- generation_config.json +11 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +40 -0
- vocab.json +0 -0
README.md
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# [Puro-2B](https://huggingface.co/thu-pacman/Puro-2B)
|
| 2 |
+
|
| 3 |
+
Puro-2B is a 2B-class causal language model trained with an openly documented,
|
| 4 |
+
cost-aware pretraining recipe. This collection contains Qwen3-compatible
|
| 5 |
+
Transformers exports for the Phase 1 checkpoint, curriculum and uniform Phase 2
|
| 6 |
+
variants, and the six late checkpoints used for the final equal-weight average.
|
| 7 |
+
|
| 8 |
+
## Model Catalog
|
| 9 |
+
|
| 10 |
+
| Model | Role |
|
| 11 |
+
| --- | --- | --- |
|
| 12 |
+
| [Puro-2B-Base](https://huggingface.co/thu-pacman/Puro-2B-Base) | Canonical exported final; equal-weight average of six late Phase 2 checkpoints. |
|
| 13 |
+
| [Puro-2B-Base-Phase1](https://huggingface.co/thu-pacman/Puro-2B-Base-Phase1) | End of Phase 1, before the Phase 2 data distribution. |
|
| 14 |
+
| [Puro-2B-Curriculum-DecayFinal](https://huggingface.co/thu-pacman/Puro-2B-Curriculum-DecayFinal) | Final checkpoint from the curriculum-ordered Phase 2 run with the decayed schedule. |
|
| 15 |
+
| [Puro-2B-Curriculum-SMA6-Inputs](https://huggingface.co/thu-pacman/Puro-2B-Curriculum-SMA6-Inputs) | Six input checkpoints used by the equal-weight simple moving average; an artifact set, not an additional averaged model. |
|
| 16 |
+
| [Puro-2B-Uniform](https://huggingface.co/thu-pacman/Puro-2B-Uniform) | Full-budget uniform-data-ordering control. |
|
| 17 |
+
| [Puro-2B-Uniform-Phase2-1of2](https://huggingface.co/thu-pacman/Puro-2B-Uniform-Phase2-1of2) | Uniform Phase 2 run at one half of the full ladder budget. |
|
| 18 |
+
| [Puro-2B-Uniform-Phase2-1of4](https://huggingface.co/thu-pacman/Puro-2B-Uniform-Phase2-1of4) | Uniform Phase 2 run at one quarter of the full ladder budget. |
|
| 19 |
+
| [Puro-2B-Uniform-Phase2-1of8](https://huggingface.co/thu-pacman/Puro-2B-Uniform-Phase2-1of8) | Uniform Phase 2 run at one eighth of the full ladder budget. |
|
| 20 |
+
| [Puro-2B-Uniform-Phase2-1of16](https://huggingface.co/thu-pacman/Puro-2B-Uniform-Phase2-1of16) | Uniform Phase 2 run at one sixteenth of the full ladder budget. |
|
| 21 |
+
|
| 22 |
+
## Training Summary
|
| 23 |
+
|
| 24 |
+
The recipe described in the accompanying Prom Technical Report has two
|
| 25 |
+
pretraining phases:
|
| 26 |
+
|
| 27 |
+
- Phase 1: approximately 439B tokens on 24 RTX 5090 GPUs.
|
| 28 |
+
- Phase 2: approximately 961B additional tokens on 96 RTX 5090 GPUs.
|
| 29 |
+
- Total: approximately 1.4T tokens.
|
| 30 |
+
- Sequence length: 4,096; global batch size: 1,536; micro-batch size: 2.
|
| 31 |
+
- Optimizer: MuonH with weight decay 0.1.
|
| 32 |
+
- Training precision: blockwise E4M3 FP8.
|
| 33 |
+
- Learning-rate schedule: power decay in Phase 1 and a decayed/continued Phase 2 schedule, depending on the released variant.
|
| 34 |
+
|
| 35 |
+
The curriculum and uniform variants share the Phase 2 pool. The curriculum
|
| 36 |
+
variant changes the data order using the documented curriculum construction;
|
| 37 |
+
the uniform control removes that ordering with a deterministic global
|
| 38 |
+
reshuffle. The ladder checkpoints are intended for controlled studies of data
|
| 39 |
+
ordering and budget, not as independently tuned deployment models.
|
| 40 |
+
|
| 41 |
+
## Reported Results Snapshot
|
| 42 |
+
|
| 43 |
+
The following headline results are reproduced from the current technical-report
|
| 44 |
+
draft and should be treated as provisional until the public evaluation table,
|
| 45 |
+
model revision, and uncertainty protocol are frozen:
|
| 46 |
+
|
| 47 |
+
- Under the report's aggregate evaluation protocol, Puro-2B is comparable to
|
| 48 |
+
Qwen2.5-1.5B and exceeds Qwen2-1.5B.
|
| 49 |
+
- In the controlled clean mathematical SFT probe, the curriculum initialization
|
| 50 |
+
is ahead of the matched uniform initialization by about 4 percentage points
|
| 51 |
+
on GSM8K at the endpoint.
|
| 52 |
+
- In the scaled mathematical SFT setup, the curriculum advantage is about 2
|
| 53 |
+
percentage points.
|
| 54 |
+
- In the broad Tulu SFT transfer setup, curriculum improves the Core15
|
| 55 |
+
macro-average by 1.59 points and is higher on 13 of 15 component benchmarks;
|
| 56 |
+
HumanEval and BoolQ are documented regressions.
|
| 57 |
+
|
| 58 |
+
These results describe matched experiments in the report. They are not claims
|
| 59 |
+
that every checkpoint in this collection has the same downstream score.
|
| 60 |
+
|
| 61 |
+
## Architecture and File Format
|
| 62 |
+
|
| 63 |
+
All exported checkpoints use the `Qwen3ForCausalLM` architecture and the same
|
| 64 |
+
tokenizer family. The checked-in configuration reports:
|
| 65 |
+
|
| 66 |
+
| Property | Value |
|
| 67 |
+
| --- | --- |
|
| 68 |
+
| Hidden size | 2,048 |
|
| 69 |
+
| Transformer layers | 28 |
|
| 70 |
+
| Attention heads / KV heads | 16 / 8 |
|
| 71 |
+
| Feed-forward size | 6,144 |
|
| 72 |
+
| Vocabulary size | 151,936 |
|
| 73 |
+
| Maximum position embeddings | 4,096 |
|
| 74 |
+
| Weight file | `model.safetensors` |
|
| 75 |
+
|
| 76 |
+
Each single-model repo contains model weights, `config.json`, generation
|
| 77 |
+
configuration, and tokenizer files. The exports do not contain optimizer
|
| 78 |
+
states, training dataloaders, or the original training checkpoints. The
|
| 79 |
+
[averaging-input repo](https://huggingface.co/thu-pacman/Puro-2B-Curriculum-SMA6-Inputs)
|
| 80 |
+
contains six complete model exports:
|
| 81 |
+
|
| 82 |
+
```text
|
| 83 |
+
iter_0222100
|
| 84 |
+
iter_0222200
|
| 85 |
+
iter_0222300
|
| 86 |
+
iter_0222400
|
| 87 |
+
iter_0222500
|
| 88 |
+
iter_0222569
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
The canonical averaged model is the equal-weight parameter average
|
| 92 |
+
|
| 93 |
+
```text
|
| 94 |
+
1/6 * (iter_0222100 + iter_0222200 + iter_0222300
|
| 95 |
+
+ iter_0222400 + iter_0222500 + iter_0222569)
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
Optimizer moments are not averaged into the exported model. The public bundle
|
| 99 |
+
records the averaging equation above without exposing machine-local paths.
|
| 100 |
+
|
| 101 |
+
## Loading a Checkpoint
|
| 102 |
+
|
| 103 |
+
After selecting one model repo, load it with a Transformers version that
|
| 104 |
+
supports the Qwen3 configuration:
|
| 105 |
+
|
| 106 |
+
```python
|
| 107 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 108 |
+
|
| 109 |
+
model_id = "thu-pacman/Puro-2B-Base"
|
| 110 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 111 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 112 |
+
model_id,
|
| 113 |
+
torch_dtype="auto",
|
| 114 |
+
device_map="auto",
|
| 115 |
+
)
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
The final release preserves the tokenizer files alongside each weight file.
|
| 119 |
+
Each linked repo has a lightweight README pointing back to this collection
|
| 120 |
+
description.
|
| 121 |
+
|
| 122 |
+
## Interpretation Notes
|
| 123 |
+
|
| 124 |
+
- `Puro-2B-Base` is a post-processed average, not a raw training checkpoint.
|
| 125 |
+
- `Puro-2B-Curriculum-SMA6-Inputs` is the reproducibility input set for that average and should be presented as an artifact bundle rather than a ninth model.
|
| 126 |
+
- `Puro-2B-Curriculum-DecayFinal` is the decay-final export; it is distinct from the six-checkpoint averaged base model.
|
| 127 |
+
- The uniform shortened checkpoints form a budget ladder. Their `1ofN` labels refer to the Phase 2 training budget, not to parameter count or model width.
|
| 128 |
+
- Downstream benchmark claims belong to the technical report and its evaluation protocol. They should not be inferred from the directory names alone.
|
| 129 |
+
|
| 130 |
+
## Reference
|
| 131 |
+
|
| 132 |
+
See the accompanying **Prom Technical Report** for the full data recipe,
|
| 133 |
+
training traces, curriculum construction, cost assumptions, and evaluation
|
| 134 |
+
protocol. This README is intentionally limited to the artifacts in this
|
| 135 |
+
collection.
|
config.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 151643,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 151643,
|
| 10 |
+
"head_dim": 128,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 2048,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 6144,
|
| 15 |
+
"layer_types": [
|
| 16 |
+
"full_attention",
|
| 17 |
+
"full_attention",
|
| 18 |
+
"full_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"full_attention"
|
| 44 |
+
],
|
| 45 |
+
"max_position_embeddings": 4096,
|
| 46 |
+
"max_window_layers": 28,
|
| 47 |
+
"model_type": "qwen3",
|
| 48 |
+
"num_attention_heads": 16,
|
| 49 |
+
"num_hidden_layers": 28,
|
| 50 |
+
"num_key_value_heads": 8,
|
| 51 |
+
"pad_token_id": 151643,
|
| 52 |
+
"rms_norm_eps": 1e-06,
|
| 53 |
+
"rope_parameters": {
|
| 54 |
+
"rope_theta": 10000.0,
|
| 55 |
+
"rope_type": "default"
|
| 56 |
+
},
|
| 57 |
+
"sliding_window": null,
|
| 58 |
+
"tie_word_embeddings": false,
|
| 59 |
+
"transformers_version": "5.13.1",
|
| 60 |
+
"use_cache": true,
|
| 61 |
+
"use_sliding_window": false,
|
| 62 |
+
"vocab_size": 151936
|
| 63 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"do_sample": false,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
151643,
|
| 6 |
+
151645
|
| 7 |
+
],
|
| 8 |
+
"max_new_tokens": 2048,
|
| 9 |
+
"pad_token_id": 151643,
|
| 10 |
+
"transformers_version": "4.37.0"
|
| 11 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:85e8b5e0122077d63ad8d4f45c99c913adafe708356ad4303107088a3b44456b
|
| 3 |
+
size 4063515640
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"151643": {
|
| 5 |
+
"content": "<|endoftext|>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"151644": {
|
| 13 |
+
"content": "<|im_start|>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"151645": {
|
| 21 |
+
"content": "<|im_end|>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"additional_special_tokens": ["<|im_start|>", "<|im_end|>"],
|
| 30 |
+
"bos_token": null,
|
| 31 |
+
"chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
| 32 |
+
"clean_up_tokenization_spaces": false,
|
| 33 |
+
"eos_token": "<|endoftext|>",
|
| 34 |
+
"errors": "replace",
|
| 35 |
+
"model_max_length": 32768,
|
| 36 |
+
"pad_token": "<|endoftext|>",
|
| 37 |
+
"split_special_tokens": false,
|
| 38 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 39 |
+
"unk_token": null
|
| 40 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|