Instructions to use TorresCoding/fin-qwen-lora-v2-hard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use TorresCoding/fin-qwen-lora-v2-hard with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3-8B-unsloth-bnb-4bit") model = PeftModel.from_pretrained(base_model, "TorresCoding/fin-qwen-lora-v2-hard") - Transformers
How to use TorresCoding/fin-qwen-lora-v2-hard with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TorresCoding/fin-qwen-lora-v2-hard") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TorresCoding/fin-qwen-lora-v2-hard", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TorresCoding/fin-qwen-lora-v2-hard with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TorresCoding/fin-qwen-lora-v2-hard" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TorresCoding/fin-qwen-lora-v2-hard", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TorresCoding/fin-qwen-lora-v2-hard
- SGLang
How to use TorresCoding/fin-qwen-lora-v2-hard 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 "TorresCoding/fin-qwen-lora-v2-hard" \ --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": "TorresCoding/fin-qwen-lora-v2-hard", "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 "TorresCoding/fin-qwen-lora-v2-hard" \ --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": "TorresCoding/fin-qwen-lora-v2-hard", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use TorresCoding/fin-qwen-lora-v2-hard with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for TorresCoding/fin-qwen-lora-v2-hard to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for TorresCoding/fin-qwen-lora-v2-hard to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for TorresCoding/fin-qwen-lora-v2-hard to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="TorresCoding/fin-qwen-lora-v2-hard", max_seq_length=2048, ) - Docker Model Runner
How to use TorresCoding/fin-qwen-lora-v2-hard with Docker Model Runner:
docker model run hf.co/TorresCoding/fin-qwen-lora-v2-hard
Fin-Qwen LoRA V2 Hard
This repository contains the V2 hard-data continued LoRA adapter for Fin-Qwen, a Qwen3-8B financial social-media sentiment model.
The adapter was continued from the V1 LoRA model using reviewed hard distillation data focused on sarcasm, dilution, rug/scam risk, leverage/liquidation, mixed financial facts, and ticker ambiguity.
Base Model
- Base: unsloth/Qwen3-8B-unsloth-bnb-4bit
- Adapter type: PEFT LoRA / QLoRA
- Training framework: Unsloth + TRL SFTTrainer
Intended Output Schema
The adapter is intended to generate JSON with:
{
"sentiment_score": 3,
"reasoning": "short financial explanation",
"tickers": ["AAPL"],
"risk_flag": false
}
risk_flag means the comment contains a separate risk-warning signal in the text; it is not a judgment of the company's real-world risk.
Evaluation Snapshot
Teacher labels are generated by DeepSeek V3.2, not human gold labels.
| Eval set | Base + schema F1 | Fin-Qwen V2 F1 | Base MAE | Fin-Qwen V2 MAE |
|---|---|---|---|---|
| Clean eval, 200 examples | 0.8220 | 0.8840 | 0.3850 | 0.2650 |
| Hard eval, 385 examples | 0.7382 | 0.8528 | 0.5325 | 0.3247 |
Notes
This is an adapter-only repository. Load it with the base Qwen3-8B model through PEFT/Unsloth. The full project code and data pipeline are tracked separately in the GitHub repository.
- Downloads last month
- 21