CodeSoft/sorbet-mini-experimental
11.4k
1---2license: apache-2.03datasets:4- roneneldan/TinyStories5language:6- en7pipeline_tag: text-generation8library_name: transformers9tags:10- sorbet11- sorbet-mini12---13 14# Sorbet Mini Experimental15 16This model isn't meant to be "good", *yet.* The whole point of Sorbet Mini17Experimental is to have a base fast enough that you can iterate on18without burning hours per experiment. It exists19to make the bigger experiments cheaper.20 21## What makes this so important for Sorbet22 23**Sorbet Mini Experimental was trained on 150M tokens, in 12 minutes, with one RTX 5060 Ti.**24 25What matters is that a full pretrain run in twelve minutes means every change26 on the Sorbet line can be tested quickly without burning hours on a larger model.27 28 ## What's next for Sorbet Mini29 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.30 31## What it is32 33- **Arch:** Qwen2ForCausalLM (native in transformers and llama.cpp)34- **Shape:** h192 × 8 layers, heads 6 (dim 32), GQA kv=1, inter 576, tied embeddings35- **Vocab:** 8192 (same tokenizer as the sorbet-25m family)36- **Params:** 4,920,512 total | bf16 ≈ 9.9 MB | Q8_0 ≈ 5.2 MB37- **Context:** 256 train / up to 512 inference38 39## Training recipe40 41## Architecture graph42 43<a href="https://hfviewer.com/CodeSoft/sorbet-mini-experimental?utm_source=huggingface&utm_medium=embedded_model_card&utm_campaign=CodeSoft_sorbet-mini-experimental_card" target="_blank" rel="noopener">44 <img45 src="https://hfviewer.com/api/card.svg?source=CodeSoft%2Fsorbet-mini-experimental&granularity=0"46 alt="Architecture graph for CodeSoft/sorbet-mini-experimental. Open in hfviewer"47 width="100%"48 />49</a>50 51| knob | value |52|---|---|53| tokens | 149,999,872 (~37× Chinchilla) |54| steps | 1144 @ 512 seqs/step (seq 256) |55| data | TinyStories |56| precision | bf16, 8-bit AdamW |57| optimizer | AdamW lr 3e-4 → 1e-5 cosine, wd 0.1 (no decay on emb/norm), grad clip 1.0 |58| hardware | RTX 5060 Ti 16GB |59 60Result: train loss 8.13 → 2.81, val perplexity 3595 → 19.47.61 62## Run it63 64```bash65# very close to f16 (recommended)66llama-completion -m sorbet-mini-experimental-q8_0.gguf \67 -p "Once upon a time," -n 128 --temp 0.8 --top-p 0.9568 69# reference full-precision build70llama-cli -m sorbet-mini-experimental-f16.gguf -p "Hello, " -n 3271```72 73## Run the safetensors (transformers)74 75```python76from transformers import AutoTokenizer, AutoModelForCausalLM77import torch78 79tok = AutoTokenizer.from_pretrained("CodeSoft/sorbet-mini-experimental")80model = AutoModelForCausalLM.from_pretrained("CodeSoft/sorbet-mini-experimental", dtype=torch.bfloat16)81# model.to("cuda") # if you have a GPU82 83prompt = "Once upon a time,"84ids = tok(prompt, return_tensors="pt").input_ids85out = model.generate(ids, max_new_tokens=128, do_sample=True,86 temperature=0.8, top_p=0.95)87print(tok.decode(out[0], skip_special_tokens=True))88```89 