Text Generation
Transformers
Safetensors
English
llama
finance
sales
lora
qlora
unsloth
nanbeige
domain-specific
numerical-analysis
aggregation
structured-data
conversational
text-generation-inference
Instructions to use NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B") model = AutoModelForCausalLM.from_pretrained("NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B
- SGLang
How to use NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B 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 "NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B" \ --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": "NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B", "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 "NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B" \ --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": "NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B 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 NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B 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 NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B", max_seq_length=2048, ) - Docker Model Runner
How to use NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B with Docker Model Runner:
docker model run hf.co/NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B
Model Overview
Flash_Financial_SFT_Nanbeige_4.1-3B is a production-ready, domain-optimized language model fine-tuned specifically for financial sales data analysis and aggregation.
Key Highlights
| Achievement | Metric | Status |
|---|---|---|
| Training Efficiency | 3.7 hours on single T4 GPU | Optimized |
| Loss Reduction | 3.91 to 0.52 (86% improvement) | Excellent |
| Perplexity | 1.69 | Outstanding |
| Parameter Efficiency | 0.043% trainable (1.7M params) | Ultra-efficient |
| Generalization | Training loss equals Eval loss (0.52) | No overfitting |
| Memory Footprint | ~50MB adapter | Deployment-ready |
Technical Architecture
- Base Model: Nanbeige4.1-3B (3.9B parameters)
- Fine-tuning Method: QLoRA (4-bit quantization + LoRA)
- LoRA Configuration: Rank 4, Alpha 8, Target modules: q_proj, v_proj, o_proj
- Trainable Parameters: 1,703,936 (0.043% of base)
- Sequence Length: 256 tokens
- Effective Batch Size: 8 (1 x 8 gradient accumulation)
- Precision: FP16 training, 4-bit inference compatible
Training Performance
- Training Duration: 222.7 minutes (3.7 hours)
- Total Steps: 4,683
- Training Examples: 37,463 structured records
- Final Training Loss: 0.5178
- Final Eval Loss: 0.5224
- Perplexity: 1.69
- Convergence: Smooth, stable, no overfitting
Core Capabilities
Primary Functions:
- Numerical Aggregation: Sum, average, count sales values accurately
- Temporal Analysis: Monthly, quarterly, annual sales summaries
- Structured Parsing: Extract insights from formatted sales records
- Report Generation: Produce consistent, formatted output
Deployment Advantages
| Advantage | Benefit |
|---|---|
| Tiny Footprint | 50MB adapter vs 6GB+ full model |
| Fast Inference | 4-bit quantization ready |
| Low Compute | Runs on consumer GPUs (8GB+ VRAM) |
| Easy Integration | Drop-in replacement for base model |
| Cost Efficient | Minimal cloud compute requirements |
Performance Benchmarks
| Task | Expected Performance |
|---|---|
| Sales total calculation | Greater than 95% accuracy |
| Monthly aggregation | Greater than 90% accuracy |
| Format consistency | Greater than 98% reliability |
| Numerical precision | High (exact sums) |
| Novel data handling | Moderate (domain-limited) |
Ideal Use Cases
- Business Intelligence Dashboards
- Automated Sales Reporting
- Financial Data Extraction Pipelines
- ERP System Integration
- Sales Performance Analytics
- Structured Data Q&A Systems
Limitations and Considerations
| Limitation | Mitigation |
|---|---|
| Domain-specific only | Use within sales/finance contexts |
| Structured input required | Pre-format data before input |
| 256 token context | Suitable for single records, not long documents |
| English language only | Train separate model for other languages |
| No complex reasoning | Combine with RAG for multi-step analysis |
Why This Model Stands Out
- Efficiency Leader: 0.043% parameter training achieves 86% loss reduction
- Production Proven: 3.7-hour training with zero crashes or instability
- Metric Excellence: 1.69 perplexity rivals models 10x larger
- Deployment Ready: Immediate usability with standard inference pipelines
- Cost Optimized: Minimal compute for maximum domain performance
Citation
@misc{sales-finance-lora-3b-2024,
title={Sales-Finance-LoRA-3B: Efficient Domain Adaptation for Financial Sales Analysis},
author={Neshverse},
year={2024},
howpublished={https://huggingface.co/Neshverse/sales-finance-lora-3b},
note={Fine-tuned using Unsloth QLoRA on Nanbeige4.1-3B.
Training: 3.7h on T4 GPU, 37K examples, 86% loss reduction, 1.69 perplexity.}
}
- Downloads last month
- 3
Model tree for NeshVerse/Flash_Financial_SFT_Nanbeige_4.1-3B
Base model
Nanbeige/Nanbeige4-3B-Base Finetuned
Nanbeige/Nanbeige4.1-3B