初始化项目,由ModelHub XC社区提供模型

Model: GPUburnout/GPUburnout-2B-75K-Chat-DPO
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-06-26 15:32:20 +08:00
commit 055acd587f
9 changed files with 159349 additions and 0 deletions

36
.gitattributes vendored Normal file
View File

@@ -0,0 +1,36 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
GPUburnout-2B-Chat-DPO-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:985d391ecb737dba15c97138960b900c78c54d78fbe4a97a2a30b03965a5a2a5
size 1170986464

88
README.md Normal file
View File

@@ -0,0 +1,88 @@
---
license: apache-2.0
language:
- en
tags:
- llama
- dpo
- chat
- from-scratch
- gpuburnout
pipeline_tag: text-generation
---
# GPUburnout-2B-75K-Chat-DPO
A 1.92 billion parameter Llama-style chat model with DPO alignment. Trained from scratch, expanded from 1B, SFT'd on SlimOrca 50K, then DPO-aligned with 1,078 preference pairs.
## Model Details
- **Architecture:** Llama-style decoder-only transformer
- **Parameters:** 1.92B
- **Hidden dim:** 2304
- **Layers:** 24
- **Attention:** GQA (36 query heads, 9 KV heads)
- **FFN:** SwiGLU (intermediate 9216)
- **Position encoding:** RoPE (theta=500000)
- **Context length:** 2048 tokens
- **Vocabulary:** 32,005 tokens (BPE + 5 special tokens)
## Training Pipeline
1. **Pretraining:** 1.04B model trained to Chinchilla-optimal (160K steps, 20.97B tokens)
2. **Growth:** Expanded 1B -> 1.92B via weight copying + new layer insertion
3. **Continued pretraining:** 75K steps on clean data (contaminated Python-Edu + FineMath replaced)
4. **SFT:** SlimOrca 50K, LoRA r=16/alpha=32, 1 epoch
5. **DPO:** 1,078 preference pairs, beta=0.1, lr=5e-7, LoRA r=16/alpha=32, 1 epoch
## DPO Details
- **Preference data:** 1,200 prompts across 10 categories, 5 responses per prompt at graduated temperatures (0.5-1.3)
- **Judge:** Claude (via Claude.ai Max subscription) — evaluation only, no distillation
- **Result:** 7/8 clean on garbage token check (vs 4/8 on 1B DPO)
- **Key insight:** Clean pretraining data was the prerequisite — 1B DPO failed because garbage tokens were baked in from contaminated pretraining data
## Garbage Token Check (8 standard prompts)
| Prompt | Status |
|---|---|
| Explain how photosynthesis works | CLEAN |
| What is the theory of relativity? | CLEAN |
| Write a Python function to reverse a string | GARBAGE |
| Tell me a creative story about a robot learning to paint | CLEAN |
| Solve: If a train travels 60 mph for 2.5 hours, how far does it go? | CLEAN |
| What are the ethical implications of AI in healthcare? | CLEAN |
| Explain the water cycle to a 10-year-old | CLEAN |
| What is the difference between a virus and a bacterium? | CLEAN |
## Usage
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("GPUburnout/GPUburnout-2B-75K-Chat-DPO", torch_dtype="float16")
tokenizer = AutoTokenizer.from_pretrained("GPUburnout/GPUburnout-2B-75K-Chat-DPO")
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain how photosynthesis works."},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7, top_p=0.9)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
```
## Related Models
- [GPUburnout-2B-75K](https://huggingface.co/GPUburnout/GPUburnout-2B-75K) — Base pretrained
- [GPUburnout-2B-75K-Chat](https://huggingface.co/GPUburnout/GPUburnout-2B-75K-Chat) — SFT only
- [GPUburnout-1B-160K](https://huggingface.co/GPUburnout/GPUburnout-1B-160K) — 1B base (Chinchilla-optimal)
## Blog
Full training journey documented at [gpuburnout.com](https://gpuburnout.com)
## Author
Jun Park ([@GPUburnout](https://github.com/GPUburnout))

4
chat_template.jinja Normal file
View File

@@ -0,0 +1,4 @@
{% for message in messages %}<|im_start|>{{ message['role'] }}
{{ message['content'] }}<|im_end|>
{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant
{% endif %}

32
config.json Normal file
View File

@@ -0,0 +1,32 @@
{
"architectures": [
"LlamaForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": 32000,
"dtype": "float16",
"eos_token_id": 32001,
"head_dim": 64,
"hidden_act": "silu",
"hidden_size": 2304,
"initializer_range": 0.02,
"intermediate_size": 9216,
"max_position_embeddings": 2048,
"mlp_bias": false,
"model_type": "llama",
"num_attention_heads": 36,
"num_hidden_layers": 24,
"num_key_value_heads": 9,
"pad_token_id": 1,
"pretraining_tp": 1,
"rms_norm_eps": 1e-06,
"rope_parameters": {
"rope_theta": 500000.0,
"rope_type": "default"
},
"tie_word_embeddings": true,
"transformers_version": "5.0.0",
"use_cache": false,
"vocab_size": 32005
}

15
generation_config.json Normal file
View File

@@ -0,0 +1,15 @@
{
"bos_token_id": 32000,
"do_sample": true,
"eos_token_id": [
32001,
32001
],
"max_new_tokens": 256,
"pad_token_id": 1,
"repetition_penalty": 1.1,
"temperature": 0.7,
"top_k": 50,
"top_p": 0.9,
"transformers_version": "5.0.0"
}

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cff4333a7d3259cabc629cb6f55c2ac311e287c989388f1589280ddf3cf2de4d
size 3842387296

159152
tokenizer.json Normal file

File diff suppressed because it is too large Load Diff

16
tokenizer_config.json Normal file
View File

@@ -0,0 +1,16 @@
{
"backend": "tokenizers",
"bos_token": "<|im_start|>",
"eos_token": "<|im_end|>",
"extra_special_tokens": [
"<|endoftext|>",
"<|system|>",
"<|user|>",
"<|assistant|>"
],
"is_local": true,
"model_max_length": 1000000000000000019884624838656,
"pad_token": "<|pad|>",
"tokenizer_class": "TokenizersBackend",
"unk_token": "<|unk|>"
}