Instructions to use ciscoriordan/lsjpre-qwen3-8b-tiebreak with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ciscoriordan/lsjpre-qwen3-8b-tiebreak with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-8B") model = PeftModel.from_pretrained(base_model, "ciscoriordan/lsjpre-qwen3-8b-tiebreak") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ciscoriordan/lsjpre-qwen3-8b-tiebreak 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 ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M # Run inference directly in the terminal: llama cli -hf ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M # Run inference directly in the terminal: llama cli -hf ciscoriordan/lsjpre-qwen3-8b-tiebreak: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 ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ciscoriordan/lsjpre-qwen3-8b-tiebreak: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 ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M
Use Docker
docker model run hf.co/ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use ciscoriordan/lsjpre-qwen3-8b-tiebreak with Ollama:
ollama run hf.co/ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M
- Unsloth Desktop
- Pi
How to use ciscoriordan/lsjpre-qwen3-8b-tiebreak with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ciscoriordan/lsjpre-qwen3-8b-tiebreak: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": "ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use ciscoriordan/lsjpre-qwen3-8b-tiebreak with Docker Model Runner:
docker model run hf.co/ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M
- Lemonade
How to use ciscoriordan/lsjpre-qwen3-8b-tiebreak with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M
Run and chat with the model
lemonade run user.lsjpre-qwen3-8b-tiebreak-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use ciscoriordan/lsjpre-qwen3-8b-tiebreak with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ciscoriordan/lsjpre-qwen3-8b-tiebreak: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 ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ciscoriordan/lsjpre-qwen3-8b-tiebreak with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf ciscoriordan/lsjpre-qwen3-8b-tiebreak: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 "ciscoriordan/lsjpre-qwen3-8b-tiebreak: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"
lsjpre-qwen3-8b-tiebreak
LoRA adapter that fine-tunes Qwen/Qwen3-8B as a tie-breaker for the
lsjpre OV (OCR-voted)
canonical-text pipeline. When the existing per-row vote across
Tesseract / Qwen / Claude / GCV / Gemini / Logeion / lsj.txt / lsj.gr
leaves a candidate tie or near-tie, the live pipeline POSTs a multi-letter
MCQ to this model: {"prompt": "Row context: '<left>[?]<right>'\n\nCandidates for [?]:\nA) <c0>\nB) <c1>\nC) <c2>\n\nAnswer:", ...} and the model
returns one capital letter naming the most plausible reading.
Versions
| Tag | Description |
|---|---|
adapter_v1 |
Original adapter trained on synthetic distractors (Latin mojibake / punct-drop / near-miss). |
main (= v2) |
Augmented training set adds 5,000 script-confusion hard negatives (e.g. Latin Od. vs Greek-omicron Οd.). Fixes the v1 regression of preferring Greek glyphs in Latin citation tokens. |
To restore v1 weights: huggingface-cli download ciscoriordan/lsjpre-qwen3-8b-tiebreak --revision adapter_v1 --local-dir <dir>.
Training (v2)
- Base:
Qwen/Qwen3-8B, 4-bit NF4 via bitsandbytes - Targets all 7 linear layers (
q/k/v/o_proj,gate/up/down_proj) - LoRA rank 16, alpha 16, dropout 0.05
- 1 epoch on 45,001 training examples (40,001 v1 + 5,000 hard-neg)
- Best val_acc on hard-neg val: 1.0000 (at step 1000 of 2812)
- Best val_acc on original val: 0.9580
- Training time: ~37 min to reach best (step 1000) on a single RTX 4090; interrupted at step 1535 since val_acc had plateaued.
Evaluation
| Adapter | Original val_acc (500-row cap) | Script-confusion val_acc (500 rows) |
|---|---|---|
| v1 | 0.9420 | 0.2360 |
| v2 | 0.9580 | 1.0000 |
The hard-negative val set is in this repo as script_confusion_eval.json.
Each row is a 3-way MCQ where the correct answer is a Latin-script
citation token (e.g. Od., Hdt., Th.6.59) and one distractor is
the same token with all uppercase Latin letters folded to their Greek
visually-identical lookalikes (Οd., Ηdt., Τh.6.59). The third
distractor is a longest-common-substring near-miss from the corpus.
Pipeline integration
The live pipeline gates Qwen calls behind:
LSJPRE_QWEN_TIEBREAK=1master enable.LSJPRE_QWEN_TIEBREAK_MARGINnear-tie margin threshold (default 1.0 = strict-tie only; recommended near-tie value is 1.2). Higher values consult Qwen on more rows; the v2 adapter is calibrated for this near-tie expansion.
Three runtime gates apply when MARGIN > 1.0:
- Margin gate: skip Qwen if winner-vs-runner-up weight ratio exceeds the margin threshold.
- Content-shape gate: skip Qwen if the winning candidate has no low-confidence shape signal (script-mix, Greek-Latin confusable lookalike, mid-word punctuation).
- Response-confidence gate: only accept Qwen replies whose first non-whitespace alpha char is a single letter; reject hedging replies like "I think A or B", "Hmm, A maybe".
See scripts/qwen_tiebreak.py in the lsjpre repo for the full client
implementation.
- Downloads last month
- 7
4-bit
docker model run hf.co/ciscoriordan/lsjpre-qwen3-8b-tiebreak:Q4_K_M