Instructions to use WiroAI/WiroAI-Finance-Qwen-1.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WiroAI/WiroAI-Finance-Qwen-1.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WiroAI/WiroAI-Finance-Qwen-1.5B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WiroAI/WiroAI-Finance-Qwen-1.5B") model = AutoModelForCausalLM.from_pretrained("WiroAI/WiroAI-Finance-Qwen-1.5B") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use WiroAI/WiroAI-Finance-Qwen-1.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WiroAI/WiroAI-Finance-Qwen-1.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WiroAI/WiroAI-Finance-Qwen-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/WiroAI/WiroAI-Finance-Qwen-1.5B
- SGLang
How to use WiroAI/WiroAI-Finance-Qwen-1.5B 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 "WiroAI/WiroAI-Finance-Qwen-1.5B" \ --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": "WiroAI/WiroAI-Finance-Qwen-1.5B", "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 "WiroAI/WiroAI-Finance-Qwen-1.5B" \ --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": "WiroAI/WiroAI-Finance-Qwen-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use WiroAI/WiroAI-Finance-Qwen-1.5B with Docker Model Runner:
docker model run hf.co/WiroAI/WiroAI-Finance-Qwen-1.5B
WiroAI-Finance-Qwen-1.5B
🚀 Meet with WiroAI/WiroAI-Finance-Qwen-1.5B! A robust language model with more finance knowledge support! 🚀
🌟 Key Features
- Fine-tuned with 500,000+ high-quality finance instructions. (Josephgflowers/Finance-Instruct-500k)
- LoRA method was used for fine-tuning without quantization.
- Adapted to finance expertise.
- Built on Qwen's architecture
📝 Model Details The model is the finance data fine-tuned version of Qwen model family. This model has been trained using Supervised Fine-Tuning (SFT) on carefully curated high-quality finance instructions. Please note that training data includes English and Chinese instructions, and this model rarely mix the two languages.
Usage
Transformers Pipeline
import transformers
import torch
model_id = "WiroAI/WiroAI-Finance-Qwen-1.5B"
pipeline = transformers.pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16},
device_map="auto",
)
pipeline.model.eval()
messages = [
{"role": "system", "content": "You are a finance chatbot developed by Wiro AI"},
{"role": "user", "content": "How can central banks balance the trade-off between controlling inflation and maintaining economic growth, especially in an environment of high public debt and geopolitical uncertainty?"
},
]
terminators = [
pipeline.tokenizer.eos_token_id,
pipeline.tokenizer.convert_tokens_to_ids("<|end▁of▁sentence|>")
]
outputs = pipeline(
messages,
max_new_tokens=512,
eos_token_id=terminators,
do_sample=True,
temperature=0.9,
)
print(outputs[0]["generated_text"][-1]['content'])
Central banks aim to strike a balance between controlling inflation and maintaining economic growth amidst high public debt and geopolitical uncertainties. They employ various policy tools and measures to achieve this objective.
First, central banks employ monetary policy to influence aggregate demand and price levels. The primary policy tools include:
1. Interest rates: Central banks adjust interest rates to manage the cost of borrowing and reduce inflation. Lower interest rates stimulate demand, while higher rates can curtail economic activity.
2. Open market operations: Central banks buy or sell government securities to influence the money supply and drive economic growth.
3. Government spending and taxation: Central banks influence fiscal policy to adjust government spending and taxation, which directly impacts economic activity and inflation.
Second, central banks utilize financial tools to stabilize the financial system and mitigate risks associated with high public debt and geopolitical uncertainties. Key measures include:
1. Capital controls: Central banks set limits on the amount of capital available to financial institutions, which helps manage risk and prevent market bubbles.
2. Financial regulations: Central banks introduce regulations to prevent excessive credit, debt, and fraud, which can contribute to inflation and systemic financial instability.
3. Financial reform: Central banks work towards improving the regulatory framework and infrastructure to enhance financial stability and support economic growth.
Furthermore, central banks consider the impact of geopolitical uncertainties on their operations. They implement measures to strengthen international relations, promote dialogue, and facilitate cooperation among countries to address global challenges collectively.
In conclusion, central banks balance the trade-off between controlling inflation and maintaining economic growth by employing a combination of monetary and financial policies, capital controls, regulatory reforms, and international cooperation. These measures help them navigate the complexities of high public debt, political instability, and economic uncertainty while pursuing their core objectives of economic stability and growth.
🤝 License and Usage
This model is provided under apache 2.0 license. Please review the license terms before use.
📫 Contact and Support
For questions, suggestions, and feedback, please open an issue on HuggingFace or contact us directly from our website.
Citation
@article{WiroAI,
title={WiroAI/WiroAI-Finance-Qwen-1.5B},
author={Abdullah Bezir, Furkan Burhan Türkay, Cengiz Asmazoğlu},
year={2025},
url={https://huggingface.co/WiroAI/WiroAI-Finance-Qwen-1.5B}
}
- Downloads last month
- 62
Model tree for WiroAI/WiroAI-Finance-Qwen-1.5B
Base model
Qwen/Qwen2.5-1.5B