Model reference · open weights
Phi-Hermes is an open-weight language model from teknium. Phi-Hermes-1.3B (BF16) weighs 2.8 GB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the teknium/Phi-Hermes-1.3B model card, 2026-10-01
What it is
| Released by | teknium |
|---|---|
| Released | 2023-09-13 |
| Parameters | 1.4B |
| VRAM | 2.8 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 2K each | |||
| RTX 3060 12 GB | 20 | all 2K | 11.6 GB |
| RTX 4060 Ti 16 GB | 29 | all 2K | 15.4 GB |
| RTX 3090 24 GB | 49 | all 2K | 23.4 GB |
| RTX 4090 24 GB | 49 | all 2K | 23.4 GB |
| RTX 5090 32 GB | 68 | all 2K | 31.0 GB |
| L40S 48 GB | 100 | all 2K | 44.0 GB |
| A100 80 GB | 185 | all 2K | 78.2 GB |
| H100 80 GB | 178 | all 2K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 217 | all 2K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 250 | all 2K | 107 GB |
| H200 141 GB | 326 | all 2K | 138 GB |
| B200 180 GB | 420 | all 2K | 176 GB |
| Requests at once | 2K tokens each |
|---|---|
| 1 | 3.8 GB |
| 5 | 5.4 GB |
| 8 | 6.6 GB |
| 16 | 9.9 GB |
| 32 | 16.3 GB |
| 64 | 29.2 GB |
One card, with vLLM's small-card settings.
From the model card
Phi-1.5 fine tuned with Hermes Dataset
This model was trained on the OpenHermes Dataset, made by me, which is over 240,000 mostly GPT-4 generated synthetic datapoints
Let me know!
Phi does not support device_map "auto", and does not seem to want to inference in fp16, so use bf16.
Here is working code to inference, though it can be improved:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("teknium/Puffin-Phi-v2", trust_remote_code=True, torch_dtype=torch.bfloat16).to("cuda")
tokenizer = AutoTokenizer.from_pretrained("teknium/Puffin-Phi-v2", trust_remote_code=True, torch_dtype=torch.bfloat16)
inputs = tokenizer(f"### Instruction:\nWrite a negative review for the website, Twitter.\n### Response:\n", return_tensors="pt", return_attention_mask=False)
outputs = model.generate(**inputs, max_length=128, do_sample=True, temperature=0.2, top_p=0.9, use_cache=True, repetition_penalty=1.2, eos_token_id=tokenizer.eos_token_id)
text = tokenizer.batch_decode(outputs)[0]
print(text)
The prompt format is Alpaca, then is prompted like so:
### Instruction:
### Response:
Trained with Axolotl. View the wandb runs for all my puffin runs (this is puffin-phi-4 on wandb): https://wandb.ai/teknium1/hermes-phi/runs/hermes-phi-1
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.