Instructions to use jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct 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 jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M # Run inference directly in the terminal: llama cli -hf jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M # Run inference directly in the terminal: llama cli -hf jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M
Use Docker
docker model run hf.co/jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct with Ollama:
ollama run hf.co/jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M
- Unsloth Desktop
- Pi
How to use jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M
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": "jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct with Docker Model Runner:
docker model run hf.co/jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M
- Lemonade
How to use jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M
Run and chat with the model
lemonade run user.tyness-boe-1.2b-pre-alpha-instruct-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct: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 jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct: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 "jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct: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"
Tyness BOE 1.2B Instruct — Pre-Alpha (focused grounded SFT)
Third pre-alpha from Tyness Train. This one is fine-tuned from the Instruct variant and trained with focused contexts: instead of whole norm sections, each prompt carries only the paragraphs lexically relevant to the question — everything fits a 2048-token training window with zero truncation.
⚠️ Status: PRE-ALPHA. Best grounded results so far (mean judge score 0.35, 2/20 fully correct, 8/20 partially correct on the hardest eval set) but not production-grade. Verify against boe.es.
Model description
| Base model | LiquidAI/LFM2.5-1.2B-Instruct |
| Task | Context-grounded Spanish law Q&A (BOE) |
| Method | QLoRA SFT (TRL, NF4 + double quant, fp32 compute) |
| Hardware | NVIDIA GTX 1060 6GB (Pascal, sm_61) |
| Training | 3.1h · 216 steps · 3 epochs · 2.0M tokens · token accuracy 78.2% |
| Author | jasonjimnz |
The experiment so far
| Version | Approach | Mean judge score |
|---|---|---|
| pre-alpha 1 | plain SFT (memorization attempt) | 0.005 |
| run2 | more plain SFT | 0.035 |
| pre-alpha 2 | RAG-style, whole sections (Base) | 0.267 |
| pre-alpha-instruct (this) | Instruct + focused paragraphs | 0.3475 |
Key insight: SFT on 1.2B models teaches format, not facts — grounding must live in the prompt, and the Instruct prior beats extra epochs on the Base model.
Training data
10 BOE articles (state + autonomous scope), 1,148 grounded train items + 20 held-out:
| BOE id | Norm | Train | Eval |
|---|---|---|---|
| BOE-A-2026-14659 | Ley 8/2026, Transporte Marítimo de Cantabria | 118 | 2 |
| BOE-A-2020-7440 | Decreto-ley 9/2020 (ayudas COVID, Extremadura) | 142 | 2 |
| BOE-A-2021-10163 | Orden HAC/612/2021, modelo 179 | 118 | 2 |
| BOE-A-2019-18746 | Orden HAC/1270/2019 | 118 | 2 |
| BOE-A-2016-9637 | Orden INT/1676/2016 | 118 | 2 |
| BOE-A-1995-19198 | Acuerdo transporte internacional por carretera | 119 | 2 |
| BOE-A-1996-6400 | RD 330/1996, traspaso de funciones | 60 | 2 |
| BOE-A-1975-9248 | Ley 17/1975, Registro de Matrícula Industrial | 118 | 2 |
| BOE-A-2014-10908 | Orden HAP/1949/2014, Punto General de Entrada | 119 | 2 |
| BOE-A-1993-10089 | RD 562/1993 | 118 | 2 |
Methodology (focused contexts):
- Each entry cites precepts (
articulos_citados); those sections are split into paragraphs and only the lexically relevant ones (term overlap with the question) enter theCONTEXTOblock, plus the norm's frontmatter identifiers (grounds BOE-A-AAAA-NNNNN answers). - System prompt: answer only from the context; «No consta en el contexto proporcionado» otherwise.
- Loss on assistant tokens only; provenance metadata never trained on.
- Evaluation: LLM referee (glm5.3-flash) on held-out items, judged against expected answers and key reasons — including the harder 9K-char-context eval set from pre-alpha 2 for comparability (this card's reported score).
Training configuration
| Parameter | Value |
|---|---|
| LoRA r / alpha | 16 / 32 (q,k,v,o_proj) |
| Learning rate / scheduler | 2e-4 / cosine, warmup 6 |
| Epochs / effective batch | 3 / 1 × 16 |
| Sequence length | 2048 (all focused contexts fit) |
| Quantization / optimizer | NF4 + double quant, fp32 compute / paged_adamw_32bit |
Evaluation
| Metric | Value (hardest eval set, 9K-char contexts) |
|---|---|
| Correct | 2/20 |
| Partial | 8/20 (40%) |
| Mean judge score | 0.3475 |
On its native focused-context eval the model behaves consistently: grounded reading, correct norm identification, refusal calibration. Exact-structure outputs (JSON fichas) remain the weak spot.
How to run
llama.cpp
llama-cli -hf jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct:Q4_K_M --jinja -c 16384
llama-server -m tyness-boe-1.2b-pre-alpha-instruct-q4_k_m.gguf -ngl 99 -c 16384 --port 8080 --jinja
curl http://127.0.0.1:8080/v1/chat/completions -d '{
"messages": [
{"role":"system","content":"Eres un jurista experto en el BOE. Responde ÚNICAMENTE con el CONTEXTO. Si un dato no consta: No consta en el contexto proporcionado."},
{"role":"user","content":"CONTEXTO:\n<relevant norm paragraphs>\n\nPREGUNTA: ¿…?"}
],
"temperature": 0
}'
transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct", dtype="auto")
tok = AutoTokenizer.from_pretrained("jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct")
messages = [
{"role": "system", "content": "Eres un jurista experto en el BOE. Responde ÚNICAMENTE con el CONTEXTO proporcionado; si un dato no consta, responde: No consta en el contexto proporcionado."},
{"role": "user", "content": "CONTEXTO:\n...\n\nPREGUNTA: ..."},
]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
Files
| File | Format | Size |
|---|---|---|
model.safetensors |
safetensors bf16 | 2.2GB |
tyness-boe-1.2b-pre-alpha-instruct-f16.gguf |
GGUF F16 | 2.2GB |
tyness-boe-1.2b-pre-alpha-instruct-q8_0.gguf |
GGUF Q8_0 | 1.2GB |
tyness-boe-1.2b-pre-alpha-instruct-q4_k_m.gguf |
GGUF Q4_K_M | 698MB |
Limitations
- 10-norm scope; 60% of hardest-eval items still fail or are only partially grounded.
- Structured/JSON outputs degrade; prose answers are stronger.
- 1.2B class: cite-only behavior is trained, but complex multi-precept reasoning is out of reach.
- Spanish only. Never use for real legal guidance.
Attribution
Base model: LiquidAI (LFM Open License v1.0). Data: Agencia Estatal Boletín Oficial del Estado, reused per its open-data conditions, via legalize-es.
Trained and published with Tyness Train v0.4.17 — Pre-Alpha, October 2026.
- Downloads last month
- 38
Model tree for jasonjimnz/tyness-boe-1.2b-pre-alpha-instruct
Base model
LiquidAI/LFM2.5-1.2B-Base