--- language: - en pipeline_tag: text-generation tags: - melon - rust - candle - from-scratch --- # melon-135m Small model trained with the full 1B recipe, with depth head mixing, as a pipeline test before the 1B run. 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. ## Benchmarks (zero-shot) 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. Params are total parameters including embeddings (\* Qwen3.5 counts include its vision encoder). Train tokens are pretraining tokens as stated by each model's authors; Melon's exclude SFT. | Model | Params | Train tokens | HellaSwag | ARC-Easy | ARC-Challenge | PIQA | LAMBADA | WinoGrande | |---|---|---|---|---|---|---|---|---| | **Melon 135M** | 0.27B | 2.7B | .341 | .548 | .271 | .650 | .337 | – | | Melon 135M SFT | 0.27B | 2.7B | .344 | .478 | .251 | .622 | .300 | – | | Hubble-1B (reference, DCLM) | 1.18B | 500B | – | .694 | .369 | .759 | – | .625 | ## Architecture - 275M parameters in total (fp32 safetensors), including the input embedding, an untied output head and 3 value-embedding tables; the name is the run's internal size label - 12 layers, d_model 768, 12 heads, context 2048, vocab 49152 - RoPE, RMSNorm, relu2 MLP, QK-norm, logit soft-cap 15, value embeddings, depth head mixing, 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. 5,150 steps of 524k tokens (~2.7B tokens). Training tokens: ~2.7B. The exact run config is in `train.toml`; the step count is in `training-state.json`. ## Usage ```sh melon-llm chat --prompt "What is photosynthesis?" # add --cuda on NVIDIA GPUs melon-llm eval ``` ## 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.