Instructions to use dennny123/Typhon-1.2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dennny123/Typhon-1.2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dennny123/Typhon-1.2B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dennny123/Typhon-1.2B") model = AutoModelForCausalLM.from_pretrained("dennny123/Typhon-1.2B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dennny123/Typhon-1.2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dennny123/Typhon-1.2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dennny123/Typhon-1.2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dennny123/Typhon-1.2B
- SGLang
How to use dennny123/Typhon-1.2B 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 "dennny123/Typhon-1.2B" \ --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": "dennny123/Typhon-1.2B", "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 "dennny123/Typhon-1.2B" \ --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": "dennny123/Typhon-1.2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dennny123/Typhon-1.2B with Docker Model Runner:
docker model run hf.co/dennny123/Typhon-1.2B
Typhon-1.2B
Typhon is a small model that turns very fast, sloppy typing into clean, properly written text, keeping your meaning and wording.
| You type | Model output |
|---|---|
dad say sdinner is at 6 so be home by the nor ur o ndish duty |
Dad says dinner is at 6, so be home by then. You're on dish duty. |
miss u guys dorm ood is so bad i wouldk illfor dads tcos rn |
Miss you guys, dorm food is so bad. I would kill for Dad's tacos right now. |
cna u pikc up some milk on the way hoem |
Can you pick up some milk on the way home? |
It fixes swapped and missing letters, wrong neighbouring keys, merged or split words, capitalization and punctuation, and writes out chat shorthand (u β you, rn β right now, im β I'm). It runs in real time on a Mac: about 190 ms per message on an Apple M4 with the 4-bit MLX version (measured).
On a Mac (MLX)
A 4-bit MLX version runs at about 190 ms per message on an Apple M4 (0.66 GB).
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
repo = "dennny123/Typhon-1.2B"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16)
text = "omgjess i passrdm ydrivrst vest firastt r"
enc = tok(f"Polish: {text}\nOut: ", return_tensors="pt")
out = model.generate(**enc, max_new_tokens=160, do_sample=False, eos_token_id=tok.eos_token_id)
print(tok.decode(out[0, enc.input_ids.shape[1]:], skip_special_tokens=True).strip())
# Oh my god, Jess, I passed my driver's test first try!
The prompt format matters: Polish: <your text>\nOut: , greedy decoding.
Training
Full fine-tune of LFM2.5-1.2B-Base, in stages:
- Typo warm-up on synthetic typo pairs.
- ~57k of one person's real typed messages, each labelled with a properly written version by Claude Opus. The labels were checked by an AI reviewer (DeepSeek), and only those with meaning problems were dropped.
- ~108k everyday message pairs: 97k written by DeepSeek V4 Pro (casual version + proper version, AI-filtered; an Opus audit rated 82% good and 0% bad) and 10k by Claude Opus. Typos were added by a sampler fitted to that person's real typing pattern (44% of their typos are swapped letters; it passes 59 statistical checks against their real typing).
There are 222k training examples in total.
Evaluation
Blind pairwise judge (Claude Opus) against Claude Opus's own one-shot rewrite, which saw the same single message. Win means the judge preferred that output; "both good" means it rated them equal.
| Test set | This model better | Claude better | Both good |
|---|---|---|---|
| Everyday messages (400, typo pattern applied) | 15% | 66% | 18% |
| The author's real typing, held-out conversations (Polish) | 23% | 57% | 16% |
A second judge (DeepSeek V4 Pro) on the everyday set: this model better 29%, Claude better 68%. Character error rate vs reference on the everyday set is 6.95% (no correction: 14.8%).
Honest summary: much better than a spellchecker or the uncorrected text, and it usually gets everyday messages right. It is still clearly behind a large frontier model, mostly on very garbled messages that need reasoning (e.g. nee doerquesg ocfjjly β "need to request off July").
Limitations
- English only. Tuned to one person's typing style, but it generalises to common typos.
- On very garbled input it can produce a fluent sentence with the wrong meaning. Check important messages.
- It rewrites shorthand and punctuation by design. Don't use it if you want your exact style kept.
- Part of the training data is one person's private chats, so the model may have picked up names and topics from them.
License
Derived from LiquidAI LFM2.5-1.2B-Base. Use is governed by the LFM Open License v1.0 (see LICENSE), including its terms on commercial use.
- Downloads last month
- 107