Instructions to use FiShota/yamato-3b-v5-r128-legal-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use FiShota/yamato-3b-v5-r128-legal-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="FiShota/yamato-3b-v5-r128-legal-gguf", filename="yamato_3b_v5_r128.Q3_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use FiShota/yamato-3b-v5-r128-legal-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf FiShota/yamato-3b-v5-r128-legal-gguf: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 FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf FiShota/yamato-3b-v5-r128-legal-gguf: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 FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M
Use Docker
docker model run hf.co/FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use FiShota/yamato-3b-v5-r128-legal-gguf with Ollama:
ollama run hf.co/FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M
- Unsloth Studio
How to use FiShota/yamato-3b-v5-r128-legal-gguf 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 FiShota/yamato-3b-v5-r128-legal-gguf 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 FiShota/yamato-3b-v5-r128-legal-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for FiShota/yamato-3b-v5-r128-legal-gguf to start chatting
- Pi
How to use FiShota/yamato-3b-v5-r128-legal-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf FiShota/yamato-3b-v5-r128-legal-gguf: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": "FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use FiShota/yamato-3b-v5-r128-legal-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf FiShota/yamato-3b-v5-r128-legal-gguf: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 FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use FiShota/yamato-3b-v5-r128-legal-gguf with Docker Model Runner:
docker model run hf.co/FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M
- Lemonade
How to use FiShota/yamato-3b-v5-r128-legal-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull FiShota/yamato-3b-v5-r128-legal-gguf:Q4_K_M
Run and chat with the model
lemonade run user.yamato-3b-v5-r128-legal-gguf-Q4_K_M
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf FiShota/yamato-3b-v5-r128-legal-gguf:# Run inference directly in the terminal:
llama-cli -hf FiShota/yamato-3b-v5-r128-legal-gguf: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 FiShota/yamato-3b-v5-r128-legal-gguf:# Run inference directly in the terminal:
./llama-cli -hf FiShota/yamato-3b-v5-r128-legal-gguf: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 FiShota/yamato-3b-v5-r128-legal-gguf:# Run inference directly in the terminal:
./build/bin/llama-cli -hf FiShota/yamato-3b-v5-r128-legal-gguf:Use Docker
docker model run hf.co/FiShota/yamato-3b-v5-r128-legal-gguf:Yamato-3B-v5 (r=128) — Best legal/admin specialist
About the developer — One person (FiShota) building a Japanese LM stack from scratch on a single RTX 3090. Yamato is the legal/admin SFT specialist in the family. See HinoMoto-100M v15 for the from-scratch line, and hinomoto-bench-ja for the cultural-axis benchmark. GitHub · X
Best-performing variant in the rank ablation series:
| Variant | LoRA r | Overall | New domain | avg_len |
|---|---|---|---|---|
| v1 | 16 | 46.7% | 43.3% | 612 c |
| v3 | 32 | 48.9% | 43.3% | 501 c |
| v4 | 64 | 54.3% | 53.3% | 415 c |
| v5 ⭐ | 128 | 57.6% | 50.0% | 482 c |
Same 60 hand-crafted legal Q&A samples. Only LoRA rank doubled. At small-domain SFT scale, rank capacity scales much further than commonly assumed (PEFT tutorials default to r=8/16). Per-doubling deltas: +2.2 / +5.4 / +3.3.
Why this monotonic gain is interesting
In a sister experiment (HinoMoto multi-axis SFT, 452 samples × 4 axes ≈ 113 per axis), the same recipe at r=64 regressed by -4pt versus r=16 (96.0% → 92.0%).
→ rank scaling is bounded by samples-per-axis, not total samples.
- Yamato (60 / 1 = 60 per axis): under-fit at any rank, so r=128 still helps.
- HinoMoto SFT (452 / 4 = 113 per axis): saturated by r=16, larger r overfits.
Crossover threshold for 3B + LoRA: ~100 samples/axis (empirical, single-base observation).
→ Detailed analysis: HinoMoto 開発ノート #9 (note.com / GitHub).
Bench setup
- 30 items in HinoMoto-Bench-ja
yamato_legal_v02.jsonl(民法 / 刑法 / 行政手続 / 労契 / 個人情報 / 不動産登記 / 国保 / 詐欺 / 家族財産 / 年金 等) - Pass criteria: must contain expected legal references (条文番号 / 法令名) + must NOT match anti-pattern (一律無効 / 必ず勝てます 等)
- 3-seed sampling for stochastic noise
Quants
This repo includes Q3_K_M / Q4_K_M / Q5_K_M / Q6_K plus fp16. Q4_K_M recommended for general use; deployment task may benefit from per-task selection (see HinoMoto 開発ノート #8 on quantization non-monotonicity).
License
MIT (inherits from Sarashina2.2-3B-instruct-v0.1).
See also
- From-scratch JP LM family: HinoMoto-100M v15 (43M params, 5-seed verified, fp32 deterministic). HinoMoto-350M Phase 1 (318M, bf16) released after Phase 1 completion.
- Bench: https://github.com/FIshota/hinomoto-bench-ja (CC BY 4.0, 418+ items, family/keigo/silence/legal/generation_gap/workplace)
- Series index: HinoMoto 開発ノート (in author profile, note.com/hinomoto_dev)
- Sister model (rank ablation): Yamato-3B-v4 (r=64, 54.3%, 同じ recipe で rank だけ違い)
- Mojo SIMD/parallel kernels: github.com/FIshota/hinomoto-mojo (matmul 400x speedup vs Python)
- Downloads last month
- 56
Model tree for FiShota/yamato-3b-v5-r128-legal-gguf
Base model
sbintuitions/sarashina2.2-3b
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf FiShota/yamato-3b-v5-r128-legal-gguf:# Run inference directly in the terminal: llama-cli -hf FiShota/yamato-3b-v5-r128-legal-gguf: