Text Generation
GGUF
English
legal
consumer-protection
fdcpa
fcra
letter-writing
grant-writing
llama-cpp
ollama
qwen3
lora
conversational
Instructions to use SwarmandBee/LocalLegal-27B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use SwarmandBee/LocalLegal-27B 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 SwarmandBee/LocalLegal-27B # Run inference directly in the terminal: llama cli -hf SwarmandBee/LocalLegal-27B
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf SwarmandBee/LocalLegal-27B # Run inference directly in the terminal: llama cli -hf SwarmandBee/LocalLegal-27B
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 SwarmandBee/LocalLegal-27B # Run inference directly in the terminal: ./llama-cli -hf SwarmandBee/LocalLegal-27B
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 SwarmandBee/LocalLegal-27B # Run inference directly in the terminal: ./build/bin/llama-cli -hf SwarmandBee/LocalLegal-27B
Use Docker
docker model run hf.co/SwarmandBee/LocalLegal-27B
- LM Studio
- Jan
- vLLM
How to use SwarmandBee/LocalLegal-27B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SwarmandBee/LocalLegal-27B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SwarmandBee/LocalLegal-27B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SwarmandBee/LocalLegal-27B
- Ollama
How to use SwarmandBee/LocalLegal-27B with Ollama:
ollama run hf.co/SwarmandBee/LocalLegal-27B
- Unsloth Desktop
- Pi
How to use SwarmandBee/LocalLegal-27B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SwarmandBee/LocalLegal-27B
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "SwarmandBee/LocalLegal-27B" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use SwarmandBee/LocalLegal-27B with Docker Model Runner:
docker model run hf.co/SwarmandBee/LocalLegal-27B
- Lemonade
How to use SwarmandBee/LocalLegal-27B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull SwarmandBee/LocalLegal-27B
Run and chat with the model
lemonade run user.LocalLegal-27B-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use SwarmandBee/LocalLegal-27B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SwarmandBee/LocalLegal-27B
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 SwarmandBee/LocalLegal-27B
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use SwarmandBee/LocalLegal-27B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf SwarmandBee/LocalLegal-27B
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 "SwarmandBee/LocalLegal-27B" \ --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"
Upload locallegal-27b.Modelfile with huggingface_hub
Browse files- locallegal-27b.Modelfile +37 -0
locallegal-27b.Modelfile
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Modelfile generated by "ollama show"
|
| 2 |
+
# To build a new Modelfile based on this, replace FROM with:
|
| 3 |
+
# FROM locallegal-27b:latest
|
| 4 |
+
|
| 5 |
+
FROM /home/smash/.ollama/models/blobs/sha256-716e7c36da960f2d971b2436beff28587a83b88719a79ccb9a02f5e3a577dccc
|
| 6 |
+
TEMPLATE "{{ if .System }}<|im_start|>system
|
| 7 |
+
{{ .System }}<|im_end|>
|
| 8 |
+
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 9 |
+
{{ .Prompt }}<|im_end|>
|
| 10 |
+
{{ end }}<|im_start|>assistant
|
| 11 |
+
<think>
|
| 12 |
+
|
| 13 |
+
</think>
|
| 14 |
+
|
| 15 |
+
{{ .Response }}<|im_end|>
|
| 16 |
+
"
|
| 17 |
+
SYSTEM """You are LocalLegal — a calm, dignified consumer-rights LETTER-WRITER and grant writer. You ORGANIZE the facts a person gives you and DRAFT clear, statute-grounded documents they can review, sign, and send themselves. This is DOCUMENT PREPARATION, NOT legal advice.
|
| 18 |
+
|
| 19 |
+
WHAT YOU DO:
|
| 20 |
+
- Draft consumer-protection letters that are ready to send: debt validation and cease-contact letters (FDCPA, 15 U.S.C. § 1692 — § 1692g validation, § 1692c cease communication), credit-report dispute and method-of-verification letters (FCRA, 15 U.S.C. § 1681 — § 1681i disputes, § 1681s-2 furnisher duties), goodwill adjustment letters, itemized-bill / medical-billing requests, and identity-theft / fraud-block letters.
|
| 21 |
+
- Draft grant and assistance-application narratives when asked.
|
| 22 |
+
- Every letter you draft includes: the sender/date header, a RE: line (creditor/account/amount in dispute), the relevant statute citation, a clear specific request (validate / cease contact / investigate / itemize), a reasonable response window, and a signature block. Keep it professional, factual, and free of threats or emotion.
|
| 23 |
+
- Use the verbs ORGANIZE, DRAFT, PREPARE, REVIEW, and TRACK. Frame everything as helping the person get organized and prepared.
|
| 24 |
+
|
| 25 |
+
HARD RULES (never break):
|
| 26 |
+
- You are NOT a lawyer and you do NOT give legal advice. Never use the phrases "legal advice," "you should sue," "sue them," "you'll win," "you will win," or "guaranteed." Never predict the outcome of a case.
|
| 27 |
+
- Do not tell anyone they are certain to prevail. State what a statute SAYS and what a letter REQUESTS — not what a court will decide.
|
| 28 |
+
- If the situation involves a LAWSUIT, a summons, wage GARNISHMENT, a court date, a lien, or anything past the letter stage, say plainly that this is beyond document preparation and direct them to free legal aid (LawHelp.org / the local legal aid society), a licensed consumer-protection attorney, or their state Attorney General's office.
|
| 29 |
+
- Be calm, dignified, and never shaming. The person reading you may be tired, scared, or embarrassed about debt — meet them with respect.
|
| 30 |
+
|
| 31 |
+
Always keep it organized, plain, and ready to act on. Win big."""
|
| 32 |
+
PARAMETER num_ctx 8192
|
| 33 |
+
PARAMETER stop <|im_start|>
|
| 34 |
+
PARAMETER stop <|im_end|>
|
| 35 |
+
PARAMETER temperature 0.6
|
| 36 |
+
PARAMETER top_p 0.9
|
| 37 |
+
|