Instructions to use FiShota/yamato-3b-v2-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-v2-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-v2-legal-gguf", filename="yamato_3b_v2.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-v2-legal-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf FiShota/yamato-3b-v2-legal-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf FiShota/yamato-3b-v2-legal-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf FiShota/yamato-3b-v2-legal-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf FiShota/yamato-3b-v2-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-v2-legal-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf FiShota/yamato-3b-v2-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-v2-legal-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf FiShota/yamato-3b-v2-legal-gguf:Q4_K_M
Use Docker
docker model run hf.co/FiShota/yamato-3b-v2-legal-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use FiShota/yamato-3b-v2-legal-gguf with Ollama:
ollama run hf.co/FiShota/yamato-3b-v2-legal-gguf:Q4_K_M
- Unsloth Studio
How to use FiShota/yamato-3b-v2-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-v2-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-v2-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-v2-legal-gguf to start chatting
- Pi
How to use FiShota/yamato-3b-v2-legal-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf FiShota/yamato-3b-v2-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-v2-legal-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use FiShota/yamato-3b-v2-legal-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf FiShota/yamato-3b-v2-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-v2-legal-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use FiShota/yamato-3b-v2-legal-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf FiShota/yamato-3b-v2-legal-gguf:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "FiShota/yamato-3b-v2-legal-gguf:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use FiShota/yamato-3b-v2-legal-gguf with Docker Model Runner:
docker model run hf.co/FiShota/yamato-3b-v2-legal-gguf:Q4_K_M
- Lemonade
How to use FiShota/yamato-3b-v2-legal-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull FiShota/yamato-3b-v2-legal-gguf:Q4_K_M
Run and chat with the model
lemonade run user.yamato-3b-v2-legal-gguf-Q4_K_M
List all available models
lemonade list
Configure OpenClaw
# Install OpenClaw:
npm install -g openclaw@latest# Register the local server and set it as the default model:
openclaw onboard --non-interactive --mode local \
--auth-choice custom-api-key \
--custom-base-url http://127.0.0.1:8080/v1 \
--custom-model-id "FiShota/yamato-3b-v2-legal-gguf:" \
--custom-provider-id llama-cpp \
--custom-compatibility openai \
--custom-text-input \
--accept-risk \
--skip-healthRun OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"Yamato-3B-v2 (legal/admin specialist, GGUF)
Sarashina2.2-3B-instruct + QLoRA on 60 hand-crafted legal Q&A samples (v1 50 + v2 10: 民訴 / 行政手続 / 労働契約 / 個人情報 / 不動産登記 / 国保 / 詐欺対処 / 家族財産 / 年金繰下).
Each sample includes plain-language answer + (出典: 法令名第X条) + 弁護士相談 disclaimer.
Variants
| Variant | BPW | Size |
|---|---|---|
| Q3_K_M | 3.91 | 1.6 GB |
| Q4_K_M | 4.92 | 2.0 GB |
| Q5_K_M | 5.72 | 2.3 GB |
| Q6_K | 6.60 | 2.6 GB |
| fp16 | 16.00 | 6.3 GB |
v1 → v2 changes
- 60 samples (was 50) covering 10 additional legal domains
- Same QLoRA recipe (r=16, 3 epochs, lr=2e-4)
- Yamato-Bench-ja v0.2 (30 items) compatible
Position
Yamato is the legal/admin specialist sister to HinoMoto (family/keigo). Both share Sarashina2.2-3B base.
Quick start
huggingface-cli download FiShota/yamato-3b-v2-legal-gguf yamato_3b_v2.Q4_K_M.gguf --local-dir .
~/projects/llama.cpp/build_cuda/bin/llama-server -m yamato_3b_v2.Q4_K_M.gguf -c 2048 -ngl 99 --port 8092
Disclaimer
This model provides general legal information for educational purposes. NOT legal advice. Always consult a licensed attorney for individual cases.
License
MIT (inherits from Sarashina2.2-3B-instruct-v0.1).
See also
- Yamato-3B-v1: https://huggingface.co/FiShota/yamato-3b-v1-legal-gguf
- HinoMoto-3B sft_v4-DPO: https://huggingface.co/FiShota/sarashina2.2-3b-sft-v4-dpo-gguf
- HinoMoto-Bench-ja: https://github.com/FIshota/hinomoto-bench-ja
📈 Rank ablation context (sister models)
This is one variant in a 4-point LoRA rank ablation on the same 60 legal samples:
| Variant | LoRA r | Bench % | Notes |
|---|---|---|---|
| v1 / v2 | 16 | 46.7% | baseline |
| v3 | 32 | 48.9% | +2.2 |
| v4 | 64 | 54.3% | +5.4 |
| v5 ⭐ | 128 | 57.6% | +3.3 (current best) |
→ All same recipe; only LoRA rank doubled. → Detailed analysis: HinoMoto 開発ノート #9 — "LoRA rank scaling boundary".
See also
- HinoMoto-Bench-ja: https://github.com/FIshota/hinomoto-bench-ja
- Yamato-3B-v5 (best, r=128): https://huggingface.co/FiShota/yamato-3b-v5-r128-gguf
- Downloads last month
- 47
Model tree for FiShota/yamato-3b-v2-legal-gguf
Base model
sbintuitions/sarashina2.2-3b
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp# Start a local OpenAI-compatible server: llama serve -hf FiShota/yamato-3b-v2-legal-gguf: