Upload melon-1b-ext2 weights and model card
Browse filesFiles changed (6)
- README.mdAdded+80
- config.jsonAdded+35
- model.safetensorsAdded+3
- tokenizer.jsonAdded
- train.tomlAdded+77
- training-state.jsonAdded+3
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980---language:- enpipeline_tag: text-generationtags:- melon- rust- candle- from-scratch---
# melon-1b-ext2
A second continuation of the 1B run that decays on reasoning-heavy data (math, reasoning traces, code).
Part of **Melon**, a language model trainer written from scratch in Rust on [Candle](https://github.com/huggingface/candle),with its own tokenizer, kernels and training pipeline. These weights are a research artifact, not a production model.
> **Not a `transformers` model.** The architecture is Melon's own, so loading it needs the Melon code> (`melon-llm`). `config.json` here is Melon's config, not a Hugging Face one.
## Architecture
- 1,312M parameters in total (fp32 safetensors), including the input embedding, an untied output head and 1 value-embedding table; the name is the run's internal size label- 20 layers, d_model 2048, 32 heads, context 4096, vocab 49152- RoPE, RMSNorm, relu2 MLP, QK-norm, logit soft-cap 15, value embeddings, gated attention, learned residual scalars
## Training
Pretraining mix (`configs/data-1b.toml`): 45% FineWeb-Edu, 30% DCLM-Baseline, 20% GitHub code, 5% FineMath, tokenized with a 49,152-entry BPE trained on the same mix.
Continued from the original run's step-8015 checkpoint (the last step at peak learning rate): 1,140 more steps at peak rate on a refreshed web/code/reasoning mix, then a 2,100-step (~2.2B token) decay to zero on a reasoning-heavy mix: 21% DeepSeek reasoning traces (big-reasoning-traces), 21% MegaMath, 21% OpenThoughts3, 8% OpenCodeReasoning, 14% FineWeb-Edu, 6% GitHub code, 5% DCLM, 3% PIPPA roleplay, 1% WordNet.
Training tokens: ~11.8B. The exact run config is in `train.toml`; the step count is in `training-state.json`.
## Chat benchmark
Our 200-question multi-turn chat benchmark (facts, math, riddles, code, and recalling earlier turns), every reply scored 0–10 by Claude Sonnet; same sampling settings for every model. Only the two Melon 1B chat models were run on it.
| Model | Overall | Facts | Math | Riddles | Code | Memory ||---|---|---|---|---|---|---|| Qwen2.5-1.5B-Instruct | 7.08 | 7.85 | 9.22 | 4.75 | 8.53 | 5.08 || Qwen3.5-2B | 6.76 | 5.60 | 9.03 | 5.08 | 7.60 | 6.53 || SmolLM2-1.7B-Instruct | 6.24 | 7.65 | 8.25 | 3.02 | 7.20 | 5.05 || Llama-3.2-1B-Instruct | 6.21 | 6.78 | 8.97 | 2.40 | 6.42 | 6.47 || Gemma-3-1B-it | 6.17 | 7.15 | 7.65 | 4.58 | 7.10 | 4.38 || Qwen3.5-0.8B | 5.32 | 4.20 | 8.38 | 2.52 | 6.08 | 5.42 || MiniCPM-1B-SFT | 5.16 | 6.88 | 6.83 | 2.21 | 6.66 | 3.23 || **melon-1b-ext2-sft-targeted** | **4.70** | 3.31 | 7.03 | 3.75 | 5.14 | 4.28 || Qwen1.5-1.8B-Chat | 3.96 | 4.47 | 5.75 | 1.32 | 4.65 | 3.58 || Phi-1.5-Instruct | 3.68 | 5.10 | 5.20 | 2.52 | 5.15 | 0.42 || melon-1b-ext2-sft | 3.12 | 4.42 | 3.95 | 1.35 | 3.20 | 2.65 || TinyLlama-1.1B-Chat | 2.60 | 5.28 | 0.53 | 1.40 | 3.83 | 1.98 |
Melon's main weaknesses: factual recall, multi-digit or decimal arithmetic, and sometimes denying that the user said something earlier in the conversation.
## Evaluation
Zero-shot, log-likelihood scoring of the answer choices (acc_norm for HellaSwag, ARC-Challenge and PIQA; acc for ARC-Easy, LAMBADA and WinoGrande). Melon numbers come from Melon's own evaluator; the Hubble-1B row comes from lm-evaluation-harness, so treat it as approximately comparable.
| Model | HellaSwag | ARC-Easy | ARC-Challenge | PIQA | LAMBADA | WinoGrande ||---|---|---|---|---|---|---|| **Melon 1B ext2** | .467 | .633 | .338 | .674 | .391 | .533 || Melon 1B | .522 | .653 | .337 | .708 | .481 | .563 || Melon 1B SFT | .527 | .616 | .340 | .693 | .452 | – || Melon 1B ext2 SFT | .460 | .598 | .323 | .671 | .413 | – || Melon 1B ext2 targeted SFT | .454 | .606 | – | .665 | – | .541 || Hubble-1B (500B tokens, reference) | – | .694 | .369 | .759 | – | .625 |
## Usage
```shmelon-llm chat <path-to-this-repo> --prompt "What is photosynthesis?" # add --cuda on NVIDIA GPUsmelon-llm eval <path-to-this-repo>```
## Limitations
Small model, trained on about 12B tokens or fewer. It makes factual mistakes, is weak at arithmetic,and has no safety tuning. Do not rely on its output.1234567891011121314151617181920212223242526272829303132333435{ "vocab_size": 49152, "context_length": 4096, "d_model": 2048, "n_layers": 20, "n_heads": 32, "d_ff": 512, "rope_theta": 10000.0, "rope_scaling": 1.0, "rope_type": "linear", "attention_chunk": 512, "attention_bf16": true, "attention_log_scale": false, "attention_prefix_tokens": 0, "attention_sink_tokens": 0, "qk_norm": true, "logit_softcap": 15.0, "untied_head": true, "embed_norm": true, "zero_init_projections": true, "residual_scalars": true, "value_embeddings": true, "value_embedding_tables": 1, "gated_attention": true, "head_mixing": "none", "head_mixing_window": 4, "mlp": "relu2", "rms_norm_eps": 0.00001, "image_size": 64, "patch_size": 16, "max_visual_tokens": 64, "bitnet": false, "bitnet_activation_bits": 8, "tokenizer": "bpe"}123version https://git-lfs.github.com/spec/v1oid sha256:00857694ab751e9aa8629f7a96e930aee1783cfbce64127d4a571503f7e90d47size 52469177121234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677out = "checkpoints/text-1b-ext2"device = "cuda"cache_dir = "data/prepared"
[model]context_length = 4096attention_chunk = 512attention_bf16 = trueqk_norm = truelogit_softcap = 15.0untied_head = trueembed_norm = truezero_init_projections = trueresidual_scalars = truevalue_embeddings = truevalue_embedding_tables = 1gated_attention = truemlp = "relu2"d_model = 2048n_layers = 20n_heads = 32d_ff = 512tokenizer = "bpe"vocab_size = 49152bitnet = falseactivation_bits = 8
[training]mode = "pretrain"steps = 2100batch = 4seq = 4096lr = 0.001warmup_steps = 100weight_decay = 0.1val_every = 250val_batches = 16val_seed = 42checkpoint_every = 500log_every = 10grad_accum_steps = 8grad_clip = 0.0total_steps = 11255schedule = "wsd"warmdown_ratio = 0.18659final_lr_frac = 0.0compute_dtype = "bf16"loss_chunk = 256pack = "bos"doc_masking = truetokenizer_train_bytes = 2000000000optimizer = "muon"muon_lr = 0.02muon_momentum = 0.95muon_weight_decay = 0.1embedding_lr = 0.2head_lr = 0.02scalar_lr = 0.03lr_width_reference = 768adam_beta1 = 0.9adam_beta2 = 0.95adam_eps = 0.00000001muon_ns_dtype = "bf16"muon_orthogonalizer = "newton-schulz"tf32 = truefused_kernels = truekeep_snapshots = 0best_weights_only = trueseed = 7ddp_bucket_mb = 256ddp_bf16_grads = falsemuon_shard_ns = false
[[datasets]]shards = "data/shards/data-1b-ext2/manifest.json"split = "train"seed = 42123{ "step": 11255}README.mdAdded+80
config.jsonAdded+35
model.safetensorsAdded+3
tokenizer.jsonAdded
train.tomlAdded+77
training-state.jsonAdded+3