Downloads · 30 days
541
100% of all-time downloads
Soulitude/Hush-Nano
Hush-Nano is a text generation model from Soulitude. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
541
100% of all-time downloads
All-time downloads
541
Public
Parameters
22.8M
92.4 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors91 MB · 98%
From the Hugging Face model README

Hush-Nano is a 22M decoder-only small language model trained from scratch on an 8.5B-token corpus.
This is a base model, not an instruction-tuned chat model.
Hush-Nano has the following features:
It is not recommended to use this model for conversations. Instead, you can apply post-training, e.g., SFT, RLHF, continued pretraining, etc., on this model.
The model was trained on 8.5B tokens (8,554,042,292) drawn from the following subsets:
| Source | Training tokens | Share |
|---|---|---|
| FineWeb-Edu | 4,539,286,619 | 53.07% |
| DCLM | 2,890,209,171 | 33.79% |
| FineMath4plus | 1,124,546,502 | 13.15% |
Zero-shot normalized accuracy, evaluated in fp32 using EleutherAI/lm-evaluation-harness. Scores may vary slightly with the evaluation setup and environment.
| PIQA | ARC-Easy | ARC-Challenge | HellaSwag | |
|---|---|---|---|---|
| Hush-Nano | 58.27% | 38.93% | 21.84% | 28.89% |
This model includes custom Transformers code and so requires trust_remote_code=True.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Soulitude/Hush-Nano"
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True,
)
device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
).to(device).eval()
prompt = "Every effort makes you"
inputs = tokenizer(
prompt,
return_tensors="pt",
add_special_tokens=False,
).to(device)
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=256,
do_sample=True,
temperature=0.7,
top_p=0.95,
repetition_penalty=1.1,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Hush-Nano is intended for small language model research, text continuation, and evaluation of pretrained model behavior. It has not been instruction-tuned and may not follow conversational instructions reliably. Its configured maximum context length is 1,024 tokens.
Apache 2.0