Text Generation
Transformers
Safetensors
English
qwen2
25M
text-generation-inference
sorbet-25m / README.md
CodeSoft's picture
Add hfviewer architecture card
da6685a verified
|
Raw
History Blame Contribute Delete
2.5 kB
---
license: apache-2.0
model_name: Sorbet-25M
pipeline_tag: text-generation
tags:
- qwen2
- 25M
language:
- en
datasets:
- HuggingFaceFW/fineweb-edu
- HuggingFaceTB/finemath
- mlfoundations/dclm-baseline-1.0-parquet
library_name: transformers
---
# Sorbet-25M
## Architecture graph
<a href="https://hfviewer.com/CodeSoft/sorbet-25m?utm_source=huggingface&amp;utm_medium=embedded_model_card&amp;utm_campaign=CodeSoft_sorbet-25m_card" target="_blank" rel="noopener">
<img
src="https://hfviewer.com/api/card.svg?source=CodeSoft%2Fsorbet-25m&amp;granularity=0"
alt="Architecture graph for CodeSoft/sorbet-25m. Open in hfviewer"
width="100%"
/>
</a>
From-scratch ~25M-parameter Qwen2-style decoder LM trained in under 4h on a single RTX 5060 Ti (16GB).
## Architecture
| | |
|---|---|
| Params | 25,185,920 (~87% non-embedding) |
| Layers / hidden | 14 / 384 |
| Attention | GQA 6 heads / 2 KV heads, RoPE θ=100k |
| FFN | 1024 (SwiGLU) |
| Context | 4096 |
| Vocab | 8,192 custom byte-level BPE (tied embeddings) |
| Precision | bf16 |
## Training data
0.8B-token weighted mix: fineweb-edu 70% / infiwebmath 10% / DCLM-baseline 20%, block-shuffled. ~3000 steps at 262,144 tok/step, cosine LR, 8-bit AdamW.
## Benchmarks
| Task | n | Random | acc | acc_norm |
|---|---|---|---|---|
| HellaSwag | 10,042 | 25% | 26.52 ±0.44 | **26.12** ±0.44 |
| ARC-easy | 2,376 | ~25% | **29.50** ±0.94 | 29.59 ±0.94 |
| ARC-challenge | 1,172 | ~25% | 17.66 ±1.11 | 22.95 ±1.23 |
| PIQA | 1,838 | 50% | **54.46** ±1.16 | 53.43 ±1.16 |
| ArithMark-3.0 | 1,000 | 25% | 32.70 ±1.48 | **32.90** ±1.48 |
Notes:
- ArithMark-3.0 (`AxiomicLabs/Arithmark-3.0`) is the strongest relative result
(+7.9 pts over random), consistent with the math share of the pretraining mix.
- ARC-challenge raw accuracy sits below chance due to a length bias in
unnormalized scores; acc_norm is the meaningful metric there.
## Usage
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "CodeSoft/sorbet-25m"
model = AutoModelForCausalLM.from_pretrained(repo, dtype="bfloat16").to("cuda")
tok = AutoTokenizer.from_pretrained(repo, subfolder="tokenizer")
ids = tok("Once upon a time", return_tensors="pt").input_ids.cuda()
print(tok.decode(model.generate(ids, max_new_tokens=64)[0]))
```
## Limitations
Expect shallow world knowledge and weak performance on knowledge-heavy benchmarks due to the model's small parameter count and limited training budget.
## License
Apache-2.0.