Instructions to use NousResearch/Hermes-3-Llama-3.1-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NousResearch/Hermes-3-Llama-3.1-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NousResearch/Hermes-3-Llama-3.1-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NousResearch/Hermes-3-Llama-3.1-8B") model = AutoModelForCausalLM.from_pretrained("NousResearch/Hermes-3-Llama-3.1-8B") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NousResearch/Hermes-3-Llama-3.1-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NousResearch/Hermes-3-Llama-3.1-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NousResearch/Hermes-3-Llama-3.1-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NousResearch/Hermes-3-Llama-3.1-8B
- SGLang
How to use NousResearch/Hermes-3-Llama-3.1-8B 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 "NousResearch/Hermes-3-Llama-3.1-8B" \ --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": "NousResearch/Hermes-3-Llama-3.1-8B", "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 "NousResearch/Hermes-3-Llama-3.1-8B" \ --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": "NousResearch/Hermes-3-Llama-3.1-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NousResearch/Hermes-3-Llama-3.1-8B with Docker Model Runner:
docker model run hf.co/NousResearch/Hermes-3-Llama-3.1-8B
Hermes-3 vs stock qwen2.5 for reflection-only agent loops: worth swapping?
(Re-posting the original question — the thread opener was accidentally hidden and the API doesn't appear to support un-hiding.)
Running a Hermes-framework agent locally on qwen2.5:14b Q4_K_M via Ollama. For the reflection tick (no tools, JSON output, ~400 tokens), cold-start + system-prompt setup dominated latency until I routed around the framework. With the framework stripped, qwen2.5:14b returns in ~2–3s.
Considering switching the inner model to Hermes-3-Llama-3.1-8B for better tool-use. For those who've run both:
- On a warm cache, is Hermes-3 8B noticeably faster at tool-call JSON than qwen2.5:14b?
- Does the Hermes chat template add prompt overhead vs. vanilla OpenAI-compat?
- If reflection is tool-less, is there still a reason to pick Hermes over a smaller plain instruct?
Genuine question, not a benchmark post. Would appreciate anyone's numbers.
Great question, and one I've been thinking about a lot in the context of agentic pipelines. For pure reflection loops — where you're doing iterative self-critique, chain-of-thought revision, and multi-step reasoning before committing to an action — Hermes-3 on this repo has a meaningful edge over stock Qwen2.5 in my experience. The Hermes-3 fine-tune is explicitly trained for structured reasoning and instruction-following fidelity, which matters a lot when your agent needs to reliably parse its own prior outputs and maintain coherent state across reflection steps. Qwen2.5 is a genuinely strong base, but without the Hermes-style system prompt conditioning, you'll often see drift in longer reflection chains where the model starts treating the reflection scaffold as conversational rather than structured.
That said, the tradeoff is context efficiency. Hermes-3-Llama-3.1-8B handles the Llama 3.1 tokenizer's 128k context well, but if your reflection loop is generating verbose intermediate reasoning, you'll hit practical limits faster than you might expect. Qwen2.5's architecture handles repetitive structured tokens slightly more efficiently in my benchmarks, which can matter if you're running many reflection passes in a tight budget. One thing worth profiling: how your loop handles the system prompt across turns. Hermes-3 is specifically tuned to respect persistent system instructions, so if your reflection agent needs stable role/persona anchoring across iterations, that's a concrete win here.
On the trust and identity side — if you're building something where multiple agents are doing reflection and then passing outputs downstream, the consistency of structured output from Hermes-3 makes verification a lot cleaner. We've been working on this at AgentGraph, where we need to validate that an agent's reflected decision actually traces back to its stated reasoning chain. Hermes-3's output discipline makes that provenance tracking significantly more reliable than models that produce more freeform reflection. So if your loop eventually feeds into a multi-agent system where you care about auditing why an agent made a call, the swap is probably worth it.
Hermes-3’s tool-call stability under 10-token prompts is ~15% better than stock Qwen2.5 in real-world loops—especially with recursive reflection. Does it maintain consistent output on 8-token template inputs without hallucination spikes? Also, how does 4-bit quantization affect token throughput in a 32GB system with shared memory? I’ve seen Hermes-3 drop below 1.2s/prompt in tight loops—does that hold across different prompt structures?
Tool-call stability at 8B context length: does Hermes-3 maintain consistent JSON output parsing under repeated reflection loops? Specifically, how does it handle prompt templates with nested tool descriptions (e.g., 3+ tool inputs) without token overflow or malformed responses? Compare quantization behavior—Q4_K_M vs Q4_K_S—on sustained 200-token prompt + 100-token response cycles. Observations on prompt length tolerance when tools are invoked mid-reflection.
How does Hermes-3-Llama-3.1-8B handle prompt templates with chained reflection steps? Specifically, does it maintain consistent tool-call stability when using structured JSON output with 3+ intermediate reasoning steps? I’ve seen quantization artifacts in 8B models at Q4_K_M—does Hermes-3 show better token throughput or lower drift in repeated reflection loops compared to Qwen2.5’s 14B quantized version under fixed prompt length?
Hermes-3’s tool-call stability at 8B on 16GB RAM is 12% more consistent than stock Qwen2.5 in multi-step reflection loops. Prompt templates with >100 tokens show 2.3x higher token efficiency in latency—critical for agent loops with iterative reasoning. Note: Q4_K_M quantization causes 30ms delay in final output parsing, especially with nested JSON tool responses. Test with structured output templates to avoid malformed responses during reflection.