Downloads · 30 days
481
30% of all-time downloads
exnivo/LoafLM-10M
LoafLM-10M is a text generation model from exnivo. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
<p align="center" <img src="https://huggingface.co/exnivo/LoafLM-10M/resolve/main/assets/LoafLM-Model-banner.png" alt="LoafLM — a tiny experimental cat language model" width="100%" / </p
Downloads · 30 days
481
30% of all-time downloads
All-time downloads
1.6K
Public
Parameters
10.3M
126 MB on disk
Likes
3
Public
Click a slice to open those files.
.gguf41.3 MB · 49%
From the Hugging Face model README
LoafLM is a tiny experimental language model with the soul of a lazy cat.
It does not want to solve your problems.
It wants to sit on your keyboard, complain about its empty bowl, and stare at closed doors like they are a personal betrayal.
This model is small, weird, and surprisingly committed to the bit.
LoafLM is a 10.3M parameter causal language model trained to generate short, strange, cat-brained responses.
Its personality is built around loaf behavior:
In other words:
if a housecat became a tiny language model, this would be it.
| Field | Value |
|---|---|
| Model name | LoafLM |
| Model type | Causal language model |
| Parameters | 10,298,880 |
| Vocabulary size | 4,096 |
| Max sequence length | 128 |
Hidden size (d_model) | 384 |
| Layers | 6 |
| Attention heads | 6 |
| FFN hidden size | 768 |
| Recommended temperature | 0.4 |
| Top-k | 50 |
| Suggested max new tokens | 64 |
| Language | English |
| Personality | Cat loaf |
LoafLM is not here to be the smartest model in the room.
LoafLM is here to say things like:
“life is a warm blanket. i sleep on it. that’s it.”
or
“i love the sunbeam. you are blocking it. move.”
or
“because the door is closed. i wanted it open. now i’m annoyed.”
That is the product.
After testing multiple temperatures, the best general setting was:
temperature = 0.4
top_k = 50
max_new_tokens = 64
Why 0.4?
Because it gave the best balance between:
Higher temperatures get more chaotic.
Lower temperatures are a bit safer, but sometimes less funny.
hi loaf
hi. i am sitting on your keyboard. it is warm.
what is the meaning of life
life is a warm blanket. i sleep on it. that's it.
tell me a joke
a cat sat on a keyboard. now i'm typing on it. that's the joke.
do you love me
i love the sunbeam. you are blocking it. move.
why is the door closed
because the door is closed. i wanted it open. now i'm annoyed.
The repository includes LoafLM-10M-F32.gguf, a full-precision GGUF for
Ollama, LM Studio, and other llama.cpp-based applications.
| Field | Value |
|---|---|
| GGUF architecture | GPT-2 compatible |
| File type | F32 |
| Quantized | No |
| File size | 41.3 MB |
| Parameters | 10,298,880 |
| Context | 128 tokens |
LoafLM uses ReLU internally, while the stock GPT-2 runtime in llama.cpp uses
GELU. The compatibility build uses a sharpened GELU transformation to closely
approximate the original ReLU model without quantizing its weights. Validation
against the Transformers model measured a maximum absolute logit difference of
9.03e-5, a mean difference of 8.33e-6, and 100% top-token agreement across
the validation prompts. The tokenizer IDs match exactly.
hf download exnivo/LoafLM-10M LoafLM-10M-F32.gguf --local-dir LoafLM-GGUF
hf download exnivo/LoafLM-10M Modelfile --local-dir LoafLM-GGUF
cd LoafLM-GGUF
ollama create loaflm -f Modelfile
ollama run loaflm
Download LoafLM-10M-F32.gguf, then import or open it in LM Studio. The GGUF
already contains the tokenizer and ChatML chat template. Use a context length
of 128, temperature 0.4, and top-k 50.
LoafLM uses a custom Transformers architecture, so loading it requires
trust_remote_code=True. The repository includes the model implementation and
a ChatML-compatible chat template.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "exnivo/LoafLM-10M"
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True,
)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
dtype=torch.float32,
).eval()
messages = [
{"role": "user", "content": "what is the meaning of life"}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt")
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=64,
temperature=0.4,
top_k=50,
do_sample=True,
)
new_tokens = output[0, inputs["input_ids"].shape[1]:]
print(tokenizer.decode(new_tokens, skip_special_tokens=True))
LoafLM is surprisingly decent at:
LoafLM is bad at:
If you ask it for Python code, it may decide that your bowl is empty and that this is now the main issue.
That is expected behavior.
A quick temperature sweep showed:
| Temp | Avg score | Notes |
|---|---|---|
| 0.1 | 6.24 | Safe, consistent |
| 0.2 | 6.02 | Still solid |
| 0.3 | 5.96 | Good |
| 0.4 | 6.25 | Best overall |
| 0.5 | 6.14 | Still fun |
| 0.6 | 5.21 | More unstable |
| 0.7 | 5.10 | Started getting messy |
| 0.8 | 5.22 | Chaotic loaf |
| 0.9 | 5.35 | Weird but usable |
| 1.0 | 5.23 | Maximum loaf energy |
Conclusion:
0.4 is the recommended default. Still, if you want pure chaos, go higher and accept the consequences.
LoafLM is intended for:
LoafLM is not intended for:
LoafLM is extremely small and very experimental.
It may:
This is not a bug.
This is part of the loaf stack.
LoafLM was not built to compete with serious models.
It was built because tiny weird models are fun.
The goal was simple:
make a model that feels like a mildly rude cat sitting in your house.
If it gives you one amazing response and then immediately says something stupid about a sock, that means it is working.
LoafLM is:
If you use this model, understand the risks:
You have been warned.