CodeSoft's picture
Add hfviewer architecture card
da7670b verified
|
Raw History Blame Contribute Delete
3.08 kB
---
license: apache-2.0
datasets:
- roneneldan/TinyStories
language:
- en
pipeline_tag: text-generation
library_name: transformers
tags:
- sorbet
- sorbet-mini
---
# Sorbet Mini Experimental
This model isn't meant to be "good", *yet.* The whole point of Sorbet Mini
Experimental is to have a base fast enough that you can iterate on
without burning hours per experiment. It exists
to make the bigger experiments cheaper.
## What makes this so important for Sorbet
**Sorbet Mini Experimental was trained on 150M tokens, in 12 minutes, with one RTX 5060 Ti.**
What matters is that a full pretrain run in twelve minutes means every change
on the Sorbet line can be tested quickly without burning hours on a larger model.
## What's next for Sorbet Mini
Since Sorbet Mini is so cheap to train, it's a no brainer to keep training it. TinyStories was used to target basic language coherence as a starting point. Eventually, the full release, Sorbet Mini, will release and hopefully perform closer to other similarly sized models.
## What it is
- **Arch:** Qwen2ForCausalLM (native in transformers and llama.cpp)
- **Shape:** h192 Γ— 8 layers, heads 6 (dim 32), GQA kv=1, inter 576, tied embeddings
- **Vocab:** 8192 (same tokenizer as the sorbet-25m family)
- **Params:** 4,920,512 total | bf16 β‰ˆ 9.9 MB | Q8_0 β‰ˆ 5.2 MB
- **Context:** 256 train / up to 512 inference
## Training recipe
## Architecture graph
<a href="https://hfviewer.com/CodeSoft/sorbet-mini-experimental?utm_source=huggingface&amp;utm_medium=embedded_model_card&amp;utm_campaign=CodeSoft_sorbet-mini-experimental_card" target="_blank" rel="noopener">
<img
src="https://hfviewer.com/api/card.svg?source=CodeSoft%2Fsorbet-mini-experimental&amp;granularity=0"
alt="Architecture graph for CodeSoft/sorbet-mini-experimental. Open in hfviewer"
width="100%"
/>
</a>
| knob | value |
|---|---|
| tokens | 149,999,872 (~37Γ— Chinchilla) |
| steps | 1144 @ 512 seqs/step (seq 256) |
| data | TinyStories |
| precision | bf16, 8-bit AdamW |
| optimizer | AdamW lr 3e-4 β†’ 1e-5 cosine, wd 0.1 (no decay on emb/norm), grad clip 1.0 |
| hardware | RTX 5060 Ti 16GB |
Result: train loss 8.13 β†’ 2.81, val perplexity 3595 β†’ 19.47.
## Run it
```bash
# very close to f16 (recommended)
llama-completion -m sorbet-mini-experimental-q8_0.gguf \
-p "Once upon a time," -n 128 --temp 0.8 --top-p 0.95
# reference full-precision build
llama-cli -m sorbet-mini-experimental-f16.gguf -p "Hello, " -n 32
```
## Run the safetensors (transformers)
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tok = AutoTokenizer.from_pretrained("CodeSoft/sorbet-mini-experimental")
model = AutoModelForCausalLM.from_pretrained("CodeSoft/sorbet-mini-experimental", dtype=torch.bfloat16)
# model.to("cuda") # if you have a GPU
prompt = "Once upon a time,"
ids = tok(prompt, return_tensors="pt").input_ids
out = model.generate(ids, max_new_tokens=128, do_sample=True,
temperature=0.8, top_p=0.95)
print(tok.decode(out[0], skip_special_tokens=True))
```