Instructions to use exnivo/LoafLM-10M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use exnivo/LoafLM-10M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="exnivo/LoafLM-10M", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("exnivo/LoafLM-10M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use exnivo/LoafLM-10M 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 exnivo/LoafLM-10M:F32 # Run inference directly in the terminal: llama cli -hf exnivo/LoafLM-10M:F32
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf exnivo/LoafLM-10M:F32 # Run inference directly in the terminal: llama cli -hf exnivo/LoafLM-10M:F32
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf exnivo/LoafLM-10M:F32 # Run inference directly in the terminal: ./llama-cli -hf exnivo/LoafLM-10M:F32
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf exnivo/LoafLM-10M:F32 # Run inference directly in the terminal: ./build/bin/llama-cli -hf exnivo/LoafLM-10M:F32
Use Docker
docker model run hf.co/exnivo/LoafLM-10M:F32
- LM Studio
- Jan
- vLLM
How to use exnivo/LoafLM-10M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "exnivo/LoafLM-10M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "exnivo/LoafLM-10M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/exnivo/LoafLM-10M:F32
- SGLang
How to use exnivo/LoafLM-10M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "exnivo/LoafLM-10M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "exnivo/LoafLM-10M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "exnivo/LoafLM-10M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "exnivo/LoafLM-10M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use exnivo/LoafLM-10M with Ollama:
ollama run hf.co/exnivo/LoafLM-10M:F32
- Unsloth Studio
How to use exnivo/LoafLM-10M with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for exnivo/LoafLM-10M to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for exnivo/LoafLM-10M to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for exnivo/LoafLM-10M to start chatting
- Docker Model Runner
How to use exnivo/LoafLM-10M with Docker Model Runner:
docker model run hf.co/exnivo/LoafLM-10M:F32
- Lemonade
How to use exnivo/LoafLM-10M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull exnivo/LoafLM-10M:F32
Run and chat with the model
lemonade run user.LoafLM-10M-F32
List all available models
lemonade list
- Atomic Chat
LoafLM
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.
What is LoafLM?
LoafLM is a 10.3M parameter causal language model trained to generate short, strange, cat-brained responses.
Its personality is built around loaf behavior:
- warm pillows
- cardboard boxes
- empty food bowls
- sunbeams
- socks
- keyboards
- dramatic reactions to closed doors
In other words:
if a housecat became a tiny language model, this would be it.
At a Glance
| 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 |
Vibe Check
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.
Recommended Generation Settings
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:
- staying in character
- being weird in a good way
- not completely falling apart
- still sounding like an annoyed loaf-shaped cat
Higher temperatures get more chaotic.
Lower temperatures are a bit safer, but sometimes less funny.
Example Outputs
Prompt
hi loaf
Output
hi. i am sitting on your keyboard. it is warm.
Prompt
what is the meaning of life
Output
life is a warm blanket. i sleep on it. that's it.
Prompt
tell me a joke
Output
a cat sat on a keyboard. now i'm typing on it. that's the joke.
Prompt
do you love me
Output
i love the sunbeam. you are blocking it. move.
Prompt
why is the door closed
Output
because the door is closed. i wanted it open. now i'm annoyed.
GGUF: Ollama and LM Studio
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.
Ollama
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
LM Studio
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.
Transformers Usage
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))
What LoafLM Is Good At
LoafLM is surprisingly decent at:
- short funny replies
- staying on a cat theme
- silly personality responses
- light meme interactions
- being small and cute
- acting like it has better things to do
What LoafLM Is Bad At
LoafLM is bad at:
- serious reasoning
- reliable coding
- factual accuracy
- long coherent writing
- useful assistance
- being normal
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.
Temperature Test Summary
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.
Intended Use
LoafLM is intended for:
- meme projects
- tiny model experiments
- personality model testing
- funny chatbot demos
- “what if a cat was an LLM?” research
- making your friends ask “why does this exist?”
Not Intended For
LoafLM is not intended for:
- medical advice
- legal advice
- financial advice
- serious coding help
- schoolwork
- truth
- wisdom
- stability
- any mission-critical task
- open-door policy enforcement
Limitations
LoafLM is extremely small and very experimental.
It may:
- repeat itself
- ignore the prompt
- drift into nonsense
- become too obsessed with pillows
- act hungry at inappropriate times
- forget what it was doing
- produce weak prompt matches
- hallucinate
- loaf
This is not a bug.
This is part of the loaf stack.
Training Philosophy
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.
TL;DR
LoafLM is:
- tiny
- funny
- cat-coded
- weirdly charming
- not useful in the traditional sense
- spiritually located on a warm pillow
Final Warning
If you use this model, understand the risks:
- it may judge you
- it may refuse to care
- it may prioritize a sunbeam over your prompt
- it may emotionally side with the cat
You have been warned.
- Downloads last month
- 348