Instructions to use AgenticFinLab/PyFi-QwenVL-7B-47K with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use AgenticFinLab/PyFi-QwenVL-7B-47K with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/home/yuxuanzhao/LLaMA-Factory/models/qwen2_5-vl-7B-Instruct") model = PeftModel.from_pretrained(base_model, "AgenticFinLab/PyFi-QwenVL-7B-47K") - Transformers
How to use AgenticFinLab/PyFi-QwenVL-7B-47K with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AgenticFinLab/PyFi-QwenVL-7B-47K") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AgenticFinLab/PyFi-QwenVL-7B-47K", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use AgenticFinLab/PyFi-QwenVL-7B-47K with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AgenticFinLab/PyFi-QwenVL-7B-47K" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AgenticFinLab/PyFi-QwenVL-7B-47K", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AgenticFinLab/PyFi-QwenVL-7B-47K
- SGLang
How to use AgenticFinLab/PyFi-QwenVL-7B-47K 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 "AgenticFinLab/PyFi-QwenVL-7B-47K" \ --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": "AgenticFinLab/PyFi-QwenVL-7B-47K", "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 "AgenticFinLab/PyFi-QwenVL-7B-47K" \ --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": "AgenticFinLab/PyFi-QwenVL-7B-47K", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AgenticFinLab/PyFi-QwenVL-7B-47K with Docker Model Runner:
docker model run hf.co/AgenticFinLab/PyFi-QwenVL-7B-47K
| { | |
| "alpha_pattern": {}, | |
| "auto_mapping": null, | |
| "base_model_name_or_path": "/home/yuxuanzhao/LLaMA-Factory/models/qwen2_5-vl-7B-Instruct", | |
| "bias": "none", | |
| "corda_config": null, | |
| "eva_config": null, | |
| "exclude_modules": null, | |
| "fan_in_fan_out": false, | |
| "inference_mode": true, | |
| "init_lora_weights": true, | |
| "layer_replication": null, | |
| "layers_pattern": null, | |
| "layers_to_transform": null, | |
| "loftq_config": {}, | |
| "lora_alpha": 16, | |
| "lora_bias": false, | |
| "lora_dropout": 0.0, | |
| "megatron_config": null, | |
| "megatron_core": "megatron.core", | |
| "modules_to_save": null, | |
| "peft_type": "LORA", | |
| "qalora_group_size": 16, | |
| "r": 8, | |
| "rank_pattern": {}, | |
| "revision": null, | |
| "target_modules": [ | |
| "layers.19.mlp.down_proj", | |
| "layers.3.mlp.gate_proj", | |
| "layers.25.mlp.up_proj", | |
| "layers.25.mlp.down_proj", | |
| "layers.4.mlp.down_proj", | |
| "layers.7.mlp.up_proj", | |
| "layers.10.mlp.gate_proj", | |
| "layers.6.mlp.gate_proj", | |
| "layers.15.mlp.gate_proj", | |
| "layers.8.mlp.gate_proj", | |
| "layers.14.mlp.gate_proj", | |
| "layers.8.mlp.up_proj", | |
| "layers.18.mlp.gate_proj", | |
| "layers.8.mlp.down_proj", | |
| "layers.14.mlp.up_proj", | |
| "layers.16.mlp.up_proj", | |
| "layers.18.mlp.up_proj", | |
| "layers.24.mlp.down_proj", | |
| "layers.5.mlp.gate_proj", | |
| "layers.17.mlp.gate_proj", | |
| "layers.10.mlp.up_proj", | |
| "layers.26.mlp.gate_proj", | |
| "layers.13.mlp.up_proj", | |
| "layers.20.mlp.down_proj", | |
| "layers.12.mlp.down_proj", | |
| "layers.17.mlp.up_proj", | |
| "layers.13.mlp.down_proj", | |
| "layers.5.mlp.down_proj", | |
| "layers.26.mlp.up_proj", | |
| "layers.21.mlp.down_proj", | |
| "layers.22.mlp.down_proj", | |
| "layers.1.mlp.down_proj", | |
| "layers.7.mlp.gate_proj", | |
| "layers.3.mlp.up_proj", | |
| "layers.4.mlp.up_proj", | |
| "layers.20.mlp.up_proj", | |
| "layers.6.mlp.down_proj", | |
| "layers.10.mlp.down_proj", | |
| "layers.13.mlp.gate_proj", | |
| "layers.2.mlp.gate_proj", | |
| "layers.22.mlp.gate_proj", | |
| "layers.21.mlp.up_proj", | |
| "layers.2.mlp.up_proj", | |
| "layers.12.mlp.up_proj", | |
| "layers.1.mlp.up_proj", | |
| "layers.23.mlp.down_proj", | |
| "layers.4.mlp.gate_proj", | |
| "layers.6.mlp.up_proj", | |
| "layers.0.mlp.down_proj", | |
| "layers.3.mlp.down_proj", | |
| "o_proj", | |
| "q_proj", | |
| "layers.11.mlp.up_proj", | |
| "layers.19.mlp.gate_proj", | |
| "layers.25.mlp.gate_proj", | |
| "layers.17.mlp.down_proj", | |
| "layers.21.mlp.gate_proj", | |
| "layers.27.mlp.down_proj", | |
| "layers.9.mlp.up_proj", | |
| "layers.1.mlp.gate_proj", | |
| "layers.20.mlp.gate_proj", | |
| "layers.9.mlp.down_proj", | |
| "layers.16.mlp.gate_proj", | |
| "layers.27.mlp.up_proj", | |
| "layers.7.mlp.down_proj", | |
| "layers.11.mlp.gate_proj", | |
| "layers.22.mlp.up_proj", | |
| "layers.15.mlp.down_proj", | |
| "k_proj", | |
| "layers.16.mlp.down_proj", | |
| "layers.2.mlp.down_proj", | |
| "layers.19.mlp.up_proj", | |
| "layers.24.mlp.gate_proj", | |
| "layers.27.mlp.gate_proj", | |
| "layers.0.mlp.up_proj", | |
| "layers.18.mlp.down_proj", | |
| "layers.14.mlp.down_proj", | |
| "layers.5.mlp.up_proj", | |
| "layers.23.mlp.gate_proj", | |
| "layers.15.mlp.up_proj", | |
| "layers.9.mlp.gate_proj", | |
| "v_proj", | |
| "layers.12.mlp.gate_proj", | |
| "layers.0.mlp.gate_proj", | |
| "layers.24.mlp.up_proj", | |
| "layers.26.mlp.down_proj", | |
| "layers.23.mlp.up_proj", | |
| "layers.11.mlp.down_proj" | |
| ], | |
| "target_parameters": null, | |
| "task_type": "CAUSAL_LM", | |
| "trainable_token_indices": null, | |
| "use_dora": false, | |
| "use_qalora": false, | |
| "use_rslora": false | |
| } |