Text Generation
Transformers
Safetensors
qwen2
finance
chinese
sft
reasoning
financial-ai
conversational
text-generation-inference
Instructions to use abocide/Qwen2.5-7B-Instruct-R1-forfinance with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abocide/Qwen2.5-7B-Instruct-R1-forfinance with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="abocide/Qwen2.5-7B-Instruct-R1-forfinance") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("abocide/Qwen2.5-7B-Instruct-R1-forfinance") model = AutoModelForCausalLM.from_pretrained("abocide/Qwen2.5-7B-Instruct-R1-forfinance", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use abocide/Qwen2.5-7B-Instruct-R1-forfinance with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "abocide/Qwen2.5-7B-Instruct-R1-forfinance" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "abocide/Qwen2.5-7B-Instruct-R1-forfinance", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/abocide/Qwen2.5-7B-Instruct-R1-forfinance
- SGLang
How to use abocide/Qwen2.5-7B-Instruct-R1-forfinance 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 "abocide/Qwen2.5-7B-Instruct-R1-forfinance" \ --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": "abocide/Qwen2.5-7B-Instruct-R1-forfinance", "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 "abocide/Qwen2.5-7B-Instruct-R1-forfinance" \ --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": "abocide/Qwen2.5-7B-Instruct-R1-forfinance", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use abocide/Qwen2.5-7B-Instruct-R1-forfinance with Docker Model Runner:
docker model run hf.co/abocide/Qwen2.5-7B-Instruct-R1-forfinance
Commit History
-
Upload model.safetensors.index.json with huggingface_hub
Verified signature5da5c67
-
Upload README.md with huggingface_hub
Verified signature9580e20 -
Upload README.md with huggingface_hub
Verified signaturea9ff445 -
Upload model-00004-of-00004.safetensors with huggingface_hub
Verified signatureb5786c4 -
Upload model-00003-of-00004.safetensors with huggingface_hub
Verified signature268c3c8 -
Upload model-00002-of-00004.safetensors with huggingface_hub
Verified signature1291eb6 -
Upload model-00001-of-00004.safetensors with huggingface_hub
Verified signaturecc5e61c -
Upload train_results.json with huggingface_hub
Verified signatureaafb5f6 -
Upload all_results.json with huggingface_hub
Verified signature7033ee4 -
Upload trainer_state.json with huggingface_hub
Verified signature6983629 -
Upload training_loss.png with huggingface_hub
Verified signature93ac056 -
Upload inference.py with huggingface_hub
Verified signature95d748b -
Upload chat_template.jinja with huggingface_hub
Verified signatureec9642a -
Upload vocab.json with huggingface_hub
Verified signature4256307 -
Upload merges.txt with huggingface_hub
Verified signature0a5d403 -
Upload added_tokens.json with huggingface_hub
Verified signaturee02bb37 -
Upload special_tokens_map.json with huggingface_hub
Verified signature203d959 -
Upload tokenizer_config.json with huggingface_hub
Verified signature40fa693 -
Upload tokenizer.json with huggingface_hub
Verified signaturedcc2e60 -
Upload model.safetensors.index.json with huggingface_hub
Verified signature39b9597 -
Upload generation_config.json with huggingface_hub
Verified signatureb9c0dd8 -
Upload config.json with huggingface_hub
Verified signature73637d2 -
initial commit
Verified signature2453af5