Instructions to use ufzoo/dreamling-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ufzoo/dreamling-4b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf ufzoo/dreamling-4b:F16 # Run inference directly in the terminal: llama cli -hf ufzoo/dreamling-4b:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ufzoo/dreamling-4b:F16 # Run inference directly in the terminal: llama cli -hf ufzoo/dreamling-4b:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf ufzoo/dreamling-4b:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf ufzoo/dreamling-4b:F16
Use Docker
docker model run hf.co/ufzoo/dreamling-4b:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use ufzoo/dreamling-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ufzoo/dreamling-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ufzoo/dreamling-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ufzoo/dreamling-4b:F16
- Ollama
How to use ufzoo/dreamling-4b with Ollama:
ollama run hf.co/ufzoo/dreamling-4b:F16
- Unsloth Desktop
- Docker Model Runner
How to use ufzoo/dreamling-4b with Docker Model Runner:
docker model run hf.co/ufzoo/dreamling-4b:F16
- Lemonade
How to use ufzoo/dreamling-4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ufzoo/dreamling-4b:F16
Run and chat with the model
lemonade run user.dreamling-4b-F16
List all available models
lemonade list
- Atomic Chat
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
.ptfiles containmodel,config,step,tokens_seen,val_loss. The custom Dreamling implementation is not included here..safetensors+config.jsonuse the Llama architecture and can be loaded with a Llama-capable implementation..gguffiles 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
- -