Downloads · 30 days
0
pinkelephantlimited/pink-elephant-llm-14b
pink-elephant-llm-14b is a text generation model from pinkelephantlimited. Use it when you need the model to write or continue text. The card lists the license as mit.
A 14.7B-parameter dense LLM by Pink Elephant Limited — the foundation of the Pink Elephant family — fine-tuned for code generation and mathematical reasoning.
Downloads · 30 days
0
Access
Public
Updated Aug 21, 2026
Repo size
29.3 GB
Likes
0
Public
Click a slice to open those files.
.safetensors29.3 GB · 100%
From the Hugging Face model README
A 14.7B-parameter dense LLM by Pink Elephant Limited — the foundation of the Pink Elephant family — fine-tuned for code generation and mathematical reasoning.
Pink Elephant LLM 14B is a dense, decoder-only large language model released in bfloat16. It is the first and foundational member of the Pink Elephant lineage. From this dense core, Pink Elephant Limited upcycled an 8-expert sparse MoE and refined it through two fine-tuning epochs to build the rest of the family. It excels at producing correctly-executed code and cleanly derived mathematical answers from conversational prompts.
Released under the permissive MIT License — free for commercial use and modification, no attribution required.
| Attribute | Value |
|---|---|
| Developer | Pink Elephant Limited |
| Architecture | Decoder-only CausalLM (grouped-query attention, gated MLP, SiLU) |
| Parameters | 14,659,507,200 (~14.66 B, bf16) |
| Transformer layers | 40 |
| Hidden size | 5120 |
| MLP intermediate size | 17,920 |
| Attention heads | 40 (10 KV heads, head dim 128) |
| Vocabulary size | 100,352 |
| Context length | 16,384 tokens (RoPE, θ=250,000) |
| Precision | bfloat16 (weights) |
| Norm | RMSNorm (ε=1e-5) |
| Fine-tuning method | LoRA r=64, α=128 (attention + MLP projections) |
| Trainable params (LoRA) | 190,054,400 (1.28% of total) |
| License | MIT |
Parameter counts are verified directly from the shard header of
final/model.safetensors(14,659,507,200 bf16 weights).
| <img src="14bfigs/benchmarks.png" width="400"><br>Verified benchmarks: HumanEval pass@1 71.34% · MATH-500 63.40% | <img src="14bfigs/efficiency.png" width="340"><br>Parameter efficiency — only 1.28% trained (LoRA r=64) |
| <img src="14bfigs/datamix.png" width="360"><br>Fine-tuning data mix — 99,661 curated examples | <img src="./training_loss.png" width="380"><br>Training loss — converged at ≈0.47 (step 1000) |
| Hyperparameter | Value |
|---|---|
| Optimizer | AdamW (weight_decay 0.01) |
| Base learning rate | 1.5e-4 |
| LR schedule | Cosine, 100-step linear warmup |
| Effective batch size | 64 sequences / optimizer step |
| Optimizer steps | 1,000 |
| Sequence length | ≤ 2,048 (collated with padding) |
| Label masking | prompt tokens masked to the assistant marker |
| Precision | mixed bfloat16 |
| Memory | gradient checkpointing + gradient accumulation |
Final training loss ≈ 0.47 (cosine schedule decayed to ~0 LR), a converged, stable run with no observed divergence.
Fine-tuned on two public, permissively-licensed instruction/solution corpora, then de-duplicated and shuffled with a fixed seed:
| Dataset | Domain | Examples |
|---|---|---|
| bigcode / self-oss-instruct (sc2-exec) | Code instructions with executable solutions | 49,661 |
| open-r1 / OpenR1-Math | Math reasoning with step-by-step solutions | 50,000 |
| Total | 99,661 |
humaneval_result.json, math500_result.json)Both benchmarks measured on the merged bf16 model (final/) with greedy decoding.
| Benchmark | Result | Protocol |
|---|---|---|
| HumanEval pass@1 | 71.34% (117/164) | Python function-completion correctness via bigcode/humanevalpack, max_new_tokens=256 |
| MATH-500 | 63.40% (317/500) | Greedy answer accuracy, LaTeX/numeric normalization, max_new_tokens=2048 |
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "pinkelephantlimited/pink-elephant-llm-14b"
tok = AutoTokenizer.from_pretrained(model_id, subfolder="final", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id, subfolder="final", torch_dtype=torch.bfloat16,
device_map="cuda", trust_remote_code=True,
)
chat = [{"role": "user", "content": "Write a Python function that checks if a number is prime."}]
prompt = tok.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
ids = tok(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
out = model.generate(**ids, max_new_tokens=256, do_sample=True, temperature=0.7, top_p=0.9)
print(tok.decode(out[0][ids.input_ids.shape[1]:], skip_special_tokens=True))
Expected runtime on a 96 GB-class GPU: ≈ 55–65 decoded tokens/s.
This 14B core is where the Pink Elephant lineage begins. From this dense foundation, Pink Elephant Limited upcycled an 8-expert Mixture-of-Experts network and refined it through two supervised-fine-tuning epochs:
pinkelephant-llm-48b — the first-epoch sparse flagship (47.7B MoE, ~14.7B active per token)pinkelephant-llm-48b-s — the refined two-epoch flagship, with training loss cut 32% (0.0616 → 0.0419)One lineage, three milestones: a proven dense core, upcycled to sparse scale, refined twice.
Max_Quality_LLM_96GB_VRAM.ipynbTECHNICAL_REPORT.mdRELEASE_REPORT.pdfUSER_MANUAL.pdf — what / which / where / how for every public artifact across the whole familyMIT License (see LICENSE). Free for commercial and research use, modification, and
redistribution, with or without attribution. Use at your own risk.
Pink Elephant Limited — Pink Elephant LLM 14B · 2026