Instructions to use jth2/fin_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use jth2/fin_model with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("DragonLLM/Llama-Open-Finance-8B") model = PeftModel.from_pretrained(base_model, "jth2/fin_model") - Transformers
How to use jth2/fin_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jth2/fin_model")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jth2/fin_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jth2/fin_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jth2/fin_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jth2/fin_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jth2/fin_model
- SGLang
How to use jth2/fin_model 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 "jth2/fin_model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jth2/fin_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "jth2/fin_model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jth2/fin_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jth2/fin_model with Docker Model Runner:
docker model run hf.co/jth2/fin_model
Update README.md
Browse files
README.md
CHANGED
|
@@ -76,7 +76,7 @@ Answer: 8. As three apples cost 75 cents, that means each apple is 25 cents by i
|
|
| 76 |
|
| 77 |
## Limitations:
|
| 78 |
|
| 79 |
-
As with any model, there are potential limitations that users should be aware of. As models are susceptible to hallucinations, users should independently verify outputs when using the tool. In addition, it should be
|
| 80 |
|
| 81 |
## References:
|
| 82 |
|
|
|
|
| 76 |
|
| 77 |
## Limitations:
|
| 78 |
|
| 79 |
+
As with any model, there are potential limitations that users should be aware of. As models are susceptible to hallucinations, users should independently verify outputs when using the tool. In addition, it should be used in conjunction with other resources and not alone as there may be information the model was not trained on. Also, as there was not a material increase on the benchmark tasks relative to the baseline model, users should make sure this model is relevant for their own task before using it in place of another.
|
| 80 |
|
| 81 |
## References:
|
| 82 |
|