Instructions to use Stee201/lira-smollm3-3b-ing-sipar-3reg with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Stee201/lira-smollm3-3b-ing-sipar-3reg with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM3-3B") model = PeftModel.from_pretrained(base_model, "Stee201/lira-smollm3-3b-ing-sipar-3reg") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Stee201/lira-smollm3-3b-ing-sipar-3reg 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 Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M # Run inference directly in the terminal: llama cli -hf Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M # Run inference directly in the terminal: llama cli -hf Stee201/lira-smollm3-3b-ing-sipar-3reg: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 Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Stee201/lira-smollm3-3b-ing-sipar-3reg: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 Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M
Use Docker
docker model run hf.co/Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Stee201/lira-smollm3-3b-ing-sipar-3reg with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Stee201/lira-smollm3-3b-ing-sipar-3reg" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Stee201/lira-smollm3-3b-ing-sipar-3reg", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M
- Ollama
How to use Stee201/lira-smollm3-3b-ing-sipar-3reg with Ollama:
ollama run hf.co/Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M
- Unsloth Desktop
- Pi
How to use Stee201/lira-smollm3-3b-ing-sipar-3reg with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Stee201/lira-smollm3-3b-ing-sipar-3reg: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": "Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Stee201/lira-smollm3-3b-ing-sipar-3reg with Docker Model Runner:
docker model run hf.co/Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M
- Lemonade
How to use Stee201/lira-smollm3-3b-ing-sipar-3reg with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M
Run and chat with the model
lemonade run user.lira-smollm3-3b-ing-sipar-3reg-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use Stee201/lira-smollm3-3b-ing-sipar-3reg with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Stee201/lira-smollm3-3b-ing-sipar-3reg: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 Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Stee201/lira-smollm3-3b-ing-sipar-3reg with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Stee201/lira-smollm3-3b-ing-sipar-3reg: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 "Stee201/lira-smollm3-3b-ing-sipar-3reg: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"
LIRA — SmolLM3 3B, English
English personal-finance question answering, grounded in material published by the Bank of England and the FCA, that writes the same answer at three different reading levels.
Design label: smollm3-3b_ing_siaddestr_sipar_3reg — trained with the retrieved paragraphs in the prompt and
with all three registers. This is the deployed configuration of the LIRA system.
What is in this repository
| file | what it is | size |
|---|---|---|
adapter_model.safetensors + adapter_config.json |
the LoRA adapter for HuggingFaceTB/SmolLM3-3B |
61 MB |
lira-smollm3-3b-ing-sipar-3reg-Q8_0.gguf |
base model with the adapter merged in, 8-bit | 3276 MB |
lira-smollm3-3b-ing-sipar-3reg-Q4_K_M.gguf |
the same, 4-bit — about half the space, for phones | 1915 MB |
The two GGUF files are the same model, only quantised differently. Pick Q8_0 unless memory is tight.
How to prompt it — read this first
The adapter is trained for retrieval-augmented use and will not behave correctly without the retrieved passages. Every training example carries six passages in the system prompt, so it has to be prompted the same way:
You are a personal finance assistant. The user has intermediate financial knowledge. You may introduce some technical terms, but always with an explanation.
RULES: Answer ONLY using the documents below. Do not make things up. Do not give specific investment advice. Answer in English, concisely.
DOCUMENT [<passage id>]:
<passage text>
DOCUMENT [<passage id>]:
<passage text>
... six in total ...
followed by the user's question as a normal user turn.
The sentence about the reader's level is what selects the register. There are three, and they are the exact strings the model was trained on:
| register | sentence |
|---|---|
base |
The user has basic financial knowledge. Use simple explanations and practical examples. Avoid technical or complex terms. |
intermediate |
The user has intermediate financial knowledge. You may introduce some technical terms, but always with an explanation. |
advanced |
The user has advanced knowledge of personal finance. Avoid overly basic explanations; you may use technical terms and give more in-depth explanations. |
Swap that sentence and the same question comes back rewritten for that reader —
shorter and plainer for base, roughly three times longer for advanced.
Quick start
With llama.cpp (4-bit):
llama-server -hf Stee201/lira-smollm3-3b-ing-sipar-3reg:Q4_K_M
With transformers + peft (the adapter on top of the base model):
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "HuggingFaceTB/SmolLM3-3B"
model = AutoModelForCausalLM.from_pretrained(base, dtype="float16", device_map="auto")
model = PeftModel.from_pretrained(model, "Stee201/lira-smollm3-3b-ing-sipar-3reg")
tok = AutoTokenizer.from_pretrained(base)
messages = [
{"role": "system", "content": system_prompt_with_six_passages},
{"role": "user", "content": question},
]
ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
print(tok.decode(model.generate(ids.to(model.device), max_new_tokens=512)[0]))
Retrieval in the paper is plain BM25 Okapi over 455 Bank of England and FCA paragraphs, top 6 — the same retriever at training and at serving time.
How well it does
| register | correctness | groundedness |
|---|---|---|
| base | 3.91 | 4.87 |
| intermediate | 4.19 | 4.90 |
| advanced | 3.60 | 4.86 |
Judge: Unbabel/M-Prometheus-14B, 1–5, on 155 held-out questions that appear nowhere in training.
Without the retrieved passages, correctness at intermediate drops to 2.77 (from 4.19): the model is trained to compose its answer out of the documents, so it depends on them.
Groundedness at advanced is lower than at intermediate across all six models. That is
a property of the register, not invention: of the words used in the answers the judge
marked down, only ~1.6% appear in none of the six passages — the same share as in the
answers it approved.
Training
LoRA rank 8, alpha 16, dropout 0.05, on the attention and feed-forward projections, loss on the answer tokens only. 4 epochs, learning rate 5e-5, checkpoint chosen by lowest validation loss. Passage order is shuffled per example and per epoch.
Training examples are byte-for-byte identical in shape to what the server sends
(persona + level instruction + six documents + question); the base and advanced
variants of each answer were generated by a language model constrained to rephrase only
the aligned source paragraph, then filtered by six automatic checks.
Limitations
- It needs its passages. Correctness without them is far below the numbers above.
- It is grounded in the Bank of England and the FCA material only, and answers nothing outside it.
- It gives no specific investment advice, by construction, and must not be used as financial advice.
- The judge is a model (
M-Prometheus-14B), not a human panel.
The other five models
Stee201/lira-gemma3-270m-ita-sipar-3reg— Gemma 3 270M, ItalianStee201/lira-gemma3-270m-ing-sipar-3reg— Gemma 3 270M, EnglishStee201/lira-gemma3-1b-ita-sipar-3reg— Gemma 3 1B, ItalianStee201/lira-gemma3-1b-ing-sipar-3reg— Gemma 3 1B, EnglishStee201/lira-smollm3-3b-ita-sipar-3reg— SmolLM3 3B, Italian
The GGUF files contain SmolLM3 weights with the adapter merged in; SmolLM3 is Apache-2.0, and so is the adapter.
Replaces Stee201/smollm3-3b-finance-en, which held
the same adapter under the older naming and only the 8-bit file.
- Downloads last month
- 158
4-bit
8-bit