Instructions to use maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking") model = AutoModelForCausalLM.from_pretrained("maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking") 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 maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking", filename="LFM2.5-1.2B-Thinking-F16.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 maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16 # Run inference directly in the terminal: llama-cli -hf maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16 # Run inference directly in the terminal: llama-cli -hf maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
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 maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16 # Run inference directly in the terminal: ./llama-cli -hf maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
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 maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
Use Docker
docker model run hf.co/maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
- LM Studio
- Jan
- vLLM
How to use maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
- SGLang
How to use maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking 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 "maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking" \ --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": "maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking", "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 "maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking" \ --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": "maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking with Ollama:
ollama run hf.co/maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
- Unsloth Studio new
How to use maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking 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 maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking 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 maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking to start chatting
- Pi new
How to use maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
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": "maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
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 maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
Run Hermes
hermes
- Docker Model Runner
How to use maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking with Docker Model Runner:
docker model run hf.co/maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
- Lemonade
How to use maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking:F16
Run and chat with the model
lemonade run user.LFM2.5-1.2B-Financial-Analyst-Thinking-F16
List all available models
lemonade list
LFM2.5-1.2B-Thinking-Financial-Analyst (LFM2.5 1.2B 金融分析专家版)
Overview | 概述
This model is a specialized version of the Liquid LFM2.5-1.2B-Thinking model, fine-tuned to act as a professional Financial Analyst. It is specifically optimized for analyzing Chinese A-share individual stocks, interpreting CFA-level financial principles, and generating structured investment logic.
本模型是基于 Liquid LFM2.5-1.2B-Thinking 的深度微调版本,旨在打造专业的金融分析助手。模型针对中国A股个股咨询、CFA专业财务知识以及结构化投资逻辑进行了深度优化。
What's New | 模型特性
- Enhanced A-Share Analysis (A股深度分析): Learned the specific narrative style and logic of Chinese equity research reports. 更擅长以中国证券行研报告的风格和逻辑进行个股分析。
- CFA Professional Knowledge (CFA专业知识支撑): Integrated high-quality data covering accounting standards, valuation models, and ethical frameworks from the CFA curriculum. 整合了涵盖会计准则、估值模型和CFA体系下的专业财务知识。
- Thinking Process (逻辑推理过程): Retains and refines the "Thinking" capability of the base model, providing a step-by-step logical deduction before outputting the final financial conclusion. 继承并优化了原模型的“思考”能力,在给出金融结论前进行严密的逻辑推导。
Data & Direction | 微调资料与方向
The fine-tuning involved a vast amount of specialized financial data, moving away from general conversational AI toward a domain-specific expert:
- Chinese Equity Research (中国行研数据): Massive collection of A-share individual stock analyses and market commentary. 累计了大量A股个股研报及市场评论。
- CFA Knowledge Base (CFA财务知识库): Structured data on financial statement analysis, corporate finance, and accounting logic. 系统化的财务报表分析、公司理财及会计逻辑数据。
- Specialized Financial Topics (金融专项课题): Deep dives into niches like Green Bonds (based on 2021 data) and the impact of cross-border capital flows. 涵盖绿色债券(基于2021年数据)及跨境资金流动影响等专项课题。
Origin | 模型渊源
- Base Model (原模型):
liquidai/lfm-2.5-1.2b-thinking. - Transformation (演变): Transformed from a general-purpose reasoning model into a structured, data-driven financial analyst. 从通用型逻辑模型演变为结构化、数据驱动的金融领域专家。
Usage | 使用方法
Option 1: LM Studio (Recommended)
- Download the .gguf file.
LFM2.5-1.2B-Thinking-F16.gguf: Full precision (Best quality, ~2.3GB).LFM2.5-1.2B-Thinking-Q8_0.gguf: 8-bit quantization (Faster, smaller, ~1.3GB).
- Import via
lms importor Drag & Drop. - The model is optimized for structured financial queries.
Option 2: Transformers (Python)
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "maximaverick/LFM2.5-1.2B-Financial-Analyst-Thinking"
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, device_map="cuda")
tokenizer = AutoTokenizer.from_pretrained(model_id)
prompt = "User: 请从CFA财务分析角度,评价某A股公司的现金流质量。\n\nAssistant:"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
output = model.generate(**inputs, max_new_tokens=1024)
print(tokenizer.decode(output[0]))
Disclaimer | 免责声明
This model is for informational purposes only and does not constitute financial advice. Small models (1.2B) may produce hallucinations; always verify critical data. 本模型仅供参考,不构成任何投资建议。1.2B量级模型可能产生幻觉,请务必核实关键数据。
Project Links
- GitHub Repository: https://github.com/SirusAI/LFM2.5-Financial-Analyst-Finetune.git
- Downloads last month
- 185