Dreamling 1 β€” 4B edition

Dreamling 1 4B is a 4.05B-parameter GPT-style language model built on one AMD Radeon RX 7900 XTX. It is the 517M Dreamling 1 model expanded by width and depth, then continued-trained on three additional Hugging Face datasets. This repository contains weights, tokenizer, and config only β€” no code.

Files

File Format What
dreamling-4b.pt custom PyTorch base 4B weights
dreamling-4b-chat.pt custom PyTorch chat-tuned 4B weights
model.safetensors HF Llama safetensors base, same weights
dreamling-4b-chat.safetensors HF Llama safetensors chat, same weights
dreamling-4b-f16.gguf GGUF F16 base
dreamling-4b-q8_0.gguf GGUF Q8_0 base
dreamling-4b-chat-f16.gguf GGUF F16 chat
dreamling-4b-chat-q8_0.gguf GGUF Q8_0 chat

The safetensors files use the Llama HF layout (model.layers.*.self_attn.*, mlp.gate_proj/up_proj/down_proj, RMSNorm, tied embeddings) with config.json. The GGUF files were generated with llama.cpp and use the gpt-2 BPE pre-tokenizer.

Architecture

Parameters 4.05B unique, 3.97B non-embedding
Layers 50
Width / heads 2560 / 20 (head dim 128)
Feed-forward SwiGLU, hidden 6912
Context 65,536 tokens
Vocabulary 32,768 BPE
Norm RMSNorm
Positions RoPE, theta 1,000,000
Embeddings tied

How it was grown from 517M

The previous 1280-wide, 24-layer model was expanded exactly:

  • Width: 1280 β†’ 2560 by duplicating channels (5120-wide internal MLP projection kept exact: 3456 β†’ 6912). At initialisation the widened model computes the same logits as the 517M model (FP32 max logit difference 6.7e-6).
  • Depth: 24 β†’ 50 layers. The 26 new blocks start as identity blocks (copies of block 23 with zeroed residual output projections).
  • Training: the original 24 blocks and the tied embeddings are frozen; the 26 new blocks (2.06B trainable parameters) and the final norm are trained.

Data

All three requested datasets were pulled from the Hugging Face Hub. The full repos are enormous (Math-Reasoning β‰ˆ4.5 TB, CulturaY β‰ˆ3.1 TB compressed), so hardware-sized shards were used:

Source Used Notes
IFM/Math-Reasoning 22.08M tokens math-dialogue + socratic-math-dialogue
Viet-Mistral/CulturaY 27.43M tokens en, tr, az, kk, la, cy, eo
halykoss/CodeGraph 2.01M tokens algorithm/domain/paradigm concept annotations
replay 25.00M tokens previous Dreamling corpus

Total: 76.5M training tokens. CodeGraph is an annotation graph keyed by Stack-Edu file identifiers and contains no source code; the released concept, category, complexity, domain, and Wikidata description tables were rendered as short encyclopedic texts. No Stack-Edu source files were downloaded or used.

Training

  • Base: 114.7M tokens, 14,000 steps at 2k context, ~857 minutes, validation loss 2.2719.
  • Chat: 11.5M tokens, 700 steps at 2k context, ~88 minutes, validation loss 2.9804.
  • Chat SFT data: Dolly (15k), Alpaca (52k), TriviaQA, GSM8K, and synthetic arithmetic. The corpus is 18.4M tokens; the run was stopped after 700 steps (11.5M tokens), so the chat model is only partially tuned.
  • Optimizer Lion (bf16 state), bf16 weights, gradient checkpointing.
  • The final context length is 65,536 tokens; training used 2,048-token blocks for memory reasons.

Formats and loading

  • .pt files contain model, config, step, tokens_seen, val_loss. The custom Dreamling implementation is not included here.
  • .safetensors + config.json use the Llama architecture and can be loaded with a Llama-capable implementation.
  • .gguf files are self-contained and load with llama.cpp/llama-cli; F16 is higher quality, Q8_0 is smaller.

The tokenizer is a byte-level BPE with <|endoftext|> id 0.

Limitations

This is a compute-limited release. Only 2.06B of the 4.05B parameters were trained in the 4B stage; the 24-block trunk is frozen from the 517M model. The model saw 114.7M tokens during the 4B run, which is far below what a 4B model normally needs. Facts, reasoning, code, and long-context retrieval remain unreliable. The chat variant is instruction-tuned on Dolly/Alpaca, TriviaQA, GSM8K, and synthetic arithmetic, but it was stopped early and is only partially tuned. A 15-prompt smoke test scored 6/15: basic facts and formatting work in places, while arithmetic and several facts remain wrong. It is not RLHF- or safety-tuned.

License

Weights and config: MIT. Data licenses remain those of the upstream datasets (Apache-2.0, CC-BY-4.0, and the Stack-Edu / The Stack v2 terms for CodeGraph identifiers).

Downloads last month
-
Safetensors
Model size
4B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support