Instructions to use Friehub/fwen-14b-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Friehub/fwen-14b-v1 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Friehub/fwen-14b-v1", filename="fwen-14b-q4_k_m-v1.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Friehub/fwen-14b-v1 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Friehub/fwen-14b-v1:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Friehub/fwen-14b-v1:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Friehub/fwen-14b-v1:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Friehub/fwen-14b-v1:Q4_K_M
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 Friehub/fwen-14b-v1:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Friehub/fwen-14b-v1:Q4_K_M
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 Friehub/fwen-14b-v1:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Friehub/fwen-14b-v1:Q4_K_M
Use Docker
docker model run hf.co/Friehub/fwen-14b-v1:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Friehub/fwen-14b-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Friehub/fwen-14b-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Friehub/fwen-14b-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Friehub/fwen-14b-v1:Q4_K_M
- Ollama
How to use Friehub/fwen-14b-v1 with Ollama:
ollama run hf.co/Friehub/fwen-14b-v1:Q4_K_M
- Unsloth Studio
How to use Friehub/fwen-14b-v1 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 Friehub/fwen-14b-v1 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 Friehub/fwen-14b-v1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Friehub/fwen-14b-v1 to start chatting
- Pi
How to use Friehub/fwen-14b-v1 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Friehub/fwen-14b-v1:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Friehub/fwen-14b-v1:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Friehub/fwen-14b-v1 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Friehub/fwen-14b-v1:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Friehub/fwen-14b-v1:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use Friehub/fwen-14b-v1 with Docker Model Runner:
docker model run hf.co/Friehub/fwen-14b-v1:Q4_K_M
- Lemonade
How to use Friehub/fwen-14b-v1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Friehub/fwen-14b-v1:Q4_K_M
Run and chat with the model
lemonade run user.fwen-14b-v1-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)Fwen-14B-v1
Friehub + Qwen β a fine-tuned 14B software engineering and CS tutor.
Trained on 7,106 instruction pairs extracted from 76 textbooks spanning algorithms, system design, networking, databases, compilers, and programming languages (Python, Go, Rust, JavaScript, C++). Answers are grounded in real engineering source material, not internet-scale guesswork.
Model Details
| Property | Value |
|---|---|
| Base Model | Qwen2.5-14B-Instruct |
| Fine-tuning | QLoRA (4-bit NF4), LoRA rank 8, alpha 16, dropout 0.05 |
| Training Data | 7,106 high-quality QA pairs (balanced, deduplicated, task-validated) |
| Task Types | 15 modes: code explanation, debugging, review, generation, complexity analysis, testing, modernization, full implementation, code completion, production scenarios, cross-source synthesis, diagram generation, prose, math, quizzes |
| Data Mix | 40% code, 20% debug, 25% design, 15% docs/Q&A |
| Epochs | 2 |
| Effective Batch Size | 32 (micro-batch 1 Γ 32 accum) |
| Learning Rate | 1e-4 |
| Warmup | 5% |
| GPU | A100-40GB |
| Training Time | 164 min |
| Language Coverage | Python, Go, Rust, JavaScript, TypeScript, Java, C, C++, SQL |
Evaluation (50 held-out QA pairs)
| Metric | Value |
|---|---|
| Average QA Score | 3.3/5 |
| Hallucination Rate | ~2% |
| Strongest Domains | Algorithms, Databases, Linux, Web APIs |
| Weakest Domains | Interview prep, abstract design principles |
Scored by human audit against ground-truth answers generated from the same source textbooks.
Capabilities
- Explain CS concepts from 70+ textbooks with source attribution
- Write production-grade code in Python, Go, Rust, JS, TS, Java, C with modern syntax (2024 editions)
- Debug and review code β find subtle bugs, suggest improvements with rationale
- Analyze algorithm complexity β trace loops, recursion, data structures
- Synthesize across books β when sources disagree, attribute each position
- Generate Mermaid diagrams β architecture, sequences, class hierarchies
- Multi-turn tutoring β conversational teaching with follow-ups
Files
| File | Size | Use |
|---|---|---|
fwen-14b-q4_k_m-v1.gguf |
8 GB | Production serving (Q4_K_M quantization) |
fwen-14b-q8_0-v1.gguf |
14 GB | Benchmark evaluation (Q8_0 quantization) |
Usage
Ollama
ollama create fwen:14b -f Modelfile
ollama run fwen:14b
llama.cpp
./llama-cli -m fwen-14b-q4_k_m-v1.gguf -p "Explain Rust ownership" -n 512
HF Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("friehub/fwen-14b-v1")
Limitations
- Trained on 7K pairs β smaller than typical fine-tune datasets. Expect adequate but not expert-level depth.
- Rust/Go underrepresented in training data (v2 will address this).
- Source attribution is sometimes vague ("the text emphasizes" vs "Chapter 4 of Code Simplicity states").
Training Pipeline
- PDF ingestion β domain classification β code/math/prose unit extraction (212,616 units)
- 15 task-type instruction pairs generated by DeepSeek V4 Pro/Flash
- Quality filter: length, dedup, relevance (cosine similarity), task validators
- Language balance: capped at 25% Python code pairs
- QLoRA fine-tune with Unsloth on A100-40GB
Citation
@model{fwen-14b-v1,
author = {Friehub},
title = {Fwen-14B: A Fine-Tuned Software Engineering Tutor},
version = {v1},
year = 2026,
url = {https://huggingface.co/friehub/fwen-14b-v1}
}
- Downloads last month
- 66
4-bit
8-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Friehub/fwen-14b-v1", filename="", )