Instructions to use NeshVerse/Flash-financial-analysis-lfm-1.2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NeshVerse/Flash-financial-analysis-lfm-1.2b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NeshVerse/Flash-financial-analysis-lfm-1.2b") model = AutoModelForCausalLM.from_pretrained("NeshVerse/Flash-financial-analysis-lfm-1.2b") 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]:])) - llama-cpp-python
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="NeshVerse/Flash-financial-analysis-lfm-1.2b", filename="flash-financial-analysis-q8_0-v2.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0 # Run inference directly in the terminal: llama-cli -hf NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0 # Run inference directly in the terminal: llama-cli -hf NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
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 NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
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 NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
Use Docker
docker model run hf.co/NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
- LM Studio
- Jan
- vLLM
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NeshVerse/Flash-financial-analysis-lfm-1.2b" # 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-analysis-lfm-1.2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
- SGLang
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b 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-analysis-lfm-1.2b" \ --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-analysis-lfm-1.2b", "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-analysis-lfm-1.2b" \ --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-analysis-lfm-1.2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b with Ollama:
ollama run hf.co/NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
- Unsloth Studio new
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b 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-analysis-lfm-1.2b 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-analysis-lfm-1.2b 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-analysis-lfm-1.2b to start chatting
- Pi new
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
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 NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
Run Hermes
hermes
- Docker Model Runner
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b with Docker Model Runner:
docker model run hf.co/NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
- Lemonade
How to use NeshVerse/Flash-financial-analysis-lfm-1.2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull NeshVerse/Flash-financial-analysis-lfm-1.2b:Q8_0
Run and chat with the model
lemonade run user.Flash-financial-analysis-lfm-1.2b-Q8_0
List all available models
lemonade list
âš¡ Flash-Financial-Analysis-LFM-1.2B
Lightning-fast financial intelligence for structured data analysis
A blazing-fast, customized, lightweight language model optimized for real-time sales & stock analytics, inventory insights, and financial reporting based on the LiquidAI 1.2B base model supervised fine-tuned FP16 model.
Rag Model Github Repo:
https://github.com/neshverse/Flash-RAG-web-GUI/tree/main
Space (Real-time Testing)
https://huggingface.co/spaces/NeshVerse/Flash-financial-analysis-lfm-1.2b
Note: If you get any error while chatting, just refresh the page.
Model Details
| Attribute | Value |
|---|---|
| Base Architecture | LiquidAI/LFM2.5-1.2B-Base |
| Fine-tuning | LoRA (r=4, alpha=8) |
| Context Window | 1,024 tokens |
| Precision | FP16 |
| Parameters | 1.2B base + ~500K LoRA |
Training Summary
- Total Samples: 39,435 (37,463 train / 1,972 validation)
- Training Duration: 2.4 hours
- Final Loss: 0.497 (train) / 0.508 (validation)
- Hardware: Consumer GPU (T4)
Capabilities
- Sales Analytics: Real-time sales data querying and analysis
- Stock Analytics: Inventory levels, turnover rates, stock movement
- Financial Reporting: Automated report generation from structured data
- Inventory Insights: Product performance, seasonal trends, demand forecasting
Performance
- Inference Speed: ~0.55 it/s (T4 GPU)
- Memory Usage: ~6GB (4-bit loaded)
- Batch Size: 4 (effective 8 with grad accum)
- Max Sequence: 1,024 tokens
Limitations
- Optimized for structured financial/sales data queries
- Context window limited to 1,024 tokens
- Training data from 2022-2023; may not reflect current market conditions
- Best performance on English language inputs
Model Files
| File | Format | Size | Description | Use Case |
|---|---|---|---|---|
model.safetensors |
FP16 | ~2.4 GB | Original full precision | Maximum quality, GPU inference |
flash-financial-analysis-q8_0.gguf |
Q8_0 | ~1.2 GB | 8-bit quantized (llama.cpp) | CPU inference, Ollama, LM Studio |
Quantized Version (Q8_0)
We now provide a Q8_0 quantized version for easier deployment:
- Format: GGUF (llama.cpp compatible)
- Size: ~50% smaller than FP16 (1.2 GB vs 2.4 GB)
- Quality: ~99.9% of original performance
- Tools: Works with llama.cpp, Ollama, LM Studio, llama-cpp-python
Download Q8_0
# Using huggingface-cli
huggingface-cli download NeshVerse/Flash-financial-analysis-lfm-1.2b flash-financial-analysis-q8_0.gguf
# Or direct download
wget https://huggingface.co/NeshVerse/Flash-financial-analysis-lfm-1.2b/resolve/main/flash-financial-analysis-q8_0.gguf
## Quick Start
```python
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
"NeshVerse/Flash-financial-analysis-lfm-1.2b",
max_seq_length=1024,
load_in_4bit=True,
trust_remote_code=True,
)
- Downloads last month
- 81