Downloads · 30 days
13
6% of all-time downloads
rocky1410/haipai-micro
haipai-micro is a text generation model from rocky1410. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
Haipai-micro is a "Micro-LLM" designed to test the limits of parameter efficiency. Despite having only 55 Million parameters (roughly 1/2 the size of GPT-2 Small), it achieves surprising performance on common sense an…
Downloads · 30 days
13
6% of all-time downloads
All-time downloads
221
Public
Parameters
55.6M
223 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors222 MB · 98%
From the Hugging Face model README
Haipai-micro is a "Micro-LLM" designed to test the limits of parameter efficiency. Despite having only 55 Million parameters (roughly 1/2 the size of GPT-2 Small), it achieves surprising performance on common sense and reasoning benchmarks by utilizing a high-density dataset mix.
This is a Base Model. It is not instruction-tuned.
haipaiHaipai uses a modern architecture inspired by Llama 3 and PaLM, scaled down for efficiency:
Despite its tiny size, Haipai-55M outperforms random baselines significantly on knowledge and common sense tasks.
| Benchmark | Haipai-55M Score | Random Chance |
|---|---|---|
| ARC-Easy | 45.88% | 25.0% |
| PIQA | 61.04% | 50.0% |
| COPA | 62.00% | 50.0% |
| Winogrande | 53.35% | 50.0% |
| Lambada (OpenAI) | 27.25% | ~0.0% |
Note: Benchmarks were run using lm-evaluation-harness in Zero-Shot setting.
Since this model uses a custom architecture, you must enable trust_remote_code=True.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "rocky1410/haipai-micro"
# 1. Load Model
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
torch_dtype=torch.float32,
device_map="auto"
)
# 2. Load Tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_id)
# 3. Generate
prompt = "Once upon a time in a digital world,"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=100,
do_sample=True,
temperature=0.7,
top_k=50
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
If you use this model or architecture, please attribute it to [rocky1410/haipai-micro].