Instructions to use mo22zy/QWEN_to_JEV_LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mo22zy/QWEN_to_JEV_LoRA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3.5-4B") model = PeftModel.from_pretrained(base_model, "mo22zy/QWEN_to_JEV_LoRA") - Transformers
How to use mo22zy/QWEN_to_JEV_LoRA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mo22zy/QWEN_to_JEV_LoRA") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mo22zy/QWEN_to_JEV_LoRA", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mo22zy/QWEN_to_JEV_LoRA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mo22zy/QWEN_to_JEV_LoRA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mo22zy/QWEN_to_JEV_LoRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mo22zy/QWEN_to_JEV_LoRA
- SGLang
How to use mo22zy/QWEN_to_JEV_LoRA with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mo22zy/QWEN_to_JEV_LoRA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mo22zy/QWEN_to_JEV_LoRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mo22zy/QWEN_to_JEV_LoRA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mo22zy/QWEN_to_JEV_LoRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use mo22zy/QWEN_to_JEV_LoRA with Docker Model Runner:
docker model run hf.co/mo22zy/QWEN_to_JEV_LoRA
QWEN_to_JEV_LoRA
A decision model: Qwen3.5-4B fine-tuned with LoRA using Unsloth's FastDecisionModel. It does not generate text. It reads an input, scores the options for each question, and returns a decision with a calibrated probability, all in one forward pass.
- Developed by: Mohamed Atef
- Base model: unsloth/Qwen3.5-4B
- Method: LoRA (r=16, alpha=16) + decision head + probability calibration
- Dataset: LocalLLaMA/typed-decisions
- License: follows the base model's license
- Merged 16-bit version: mo22zy/QWEN_to_JEV_LoRA_16bit
Question types
| Type | Output |
|---|---|
choice |
one option (e.g. which team handles a ticket) |
noul |
True / False |
score |
a level number (e.g. urgency) |
Usage
from unsloth import FastDecisionModel
import json
from datasets import load_dataset
model, tokenizer = FastDecisionModel.from_pretrained(
model_name = "mo22zy/QWEN_to_JEV_LoRA",
max_seq_length = 2048,
load_in_4bit = True,
)
state = "I was charged twice and now I get error 403. I need access before my presentation tomorrow."
# questions must follow the dataset schema
questions = json.loads(load_dataset("LocalLLaMA/typed-decisions", "all", split="test")[0]["questions"])
answers = FastDecisionModel.predict(model, tokenizer, state, questions)
for name, r in answers.items():
print(name, r["answer"], {k: round(v, 3) for k, v in r["probabilities"].items()})
Training
| Setting | Value |
|---|---|
| Framework | Unsloth + TRL (DecisionTrainer) |
| Quantization | 4-bit |
| LoRA | r=16, alpha=16, dropout=0 |
| Steps | 60 (about 1.7 epochs) |
| Batch size | 8 x 4 gradient accumulation = 32 |
| Learning rate | 2e-4, cosine schedule, 10 warmup steps |
| Weight decay | 0.01 |
| Seed | 3407 |
| Max sequence length | 2048 |
Calibration was fitted on a held-out split of the training data. The test split was not used for training or calibration.
Evaluation
| Metric | Held-out (calibration) | Test split |
|---|---|---|
| Accuracy | 79.25% | 77.95% |
| ECE | 0.0278 | 0.0335 |
| Loss | 1.1480 | 1.1905 |
Accuracy before training was about 30% (near random).
Example: for a ticket about a double charge and a 403 login error, urgency confidence went from 0.26 (before) to 0.99 (after), and the case was flagged for human review.
Intended use
Ticket triage, routing, urgency scoring, and lightweight classification before calling a larger LLM or a tool.
Limitations
- About 78% accuracy: not suitable for fully automated decisions. Use a confidence threshold and send low-confidence cases to a human.
- Trained on one public dataset; accuracy on your own data may differ. Fine-tune on your own tickets before production use.
- Questions and options must follow the dataset schema.
- Downloads last month
- 33