Instructions to use MayaPH/FinOPT-Washington with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MayaPH/FinOPT-Washington with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MayaPH/FinOPT-Washington")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MayaPH/FinOPT-Washington") model = AutoModelForCausalLM.from_pretrained("MayaPH/FinOPT-Washington") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MayaPH/FinOPT-Washington with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MayaPH/FinOPT-Washington" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MayaPH/FinOPT-Washington", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MayaPH/FinOPT-Washington
- SGLang
How to use MayaPH/FinOPT-Washington 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 "MayaPH/FinOPT-Washington" \ --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": "MayaPH/FinOPT-Washington", "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 "MayaPH/FinOPT-Washington" \ --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": "MayaPH/FinOPT-Washington", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MayaPH/FinOPT-Washington with Docker Model Runner:
docker model run hf.co/MayaPH/FinOPT-Washington
Commit ·
ffe268e
1
Parent(s): 3f44e4f
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
---
|
| 5 |
|
|
@@ -24,9 +24,13 @@ FinOPT-Washington is designed to assist users in obtaining relevant and reliable
|
|
| 24 |
The model is intended to be used by individuals seeking information about financial topics, as well as developers and researchers working on natural language processing (NLP) tasks in the financial domain.
|
| 25 |
|
| 26 |
## Usage
|
| 27 |
-
To use FinOPT-Washington, you
|
| 28 |
|
| 29 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 31 |
|
| 32 |
tokenizer = AutoTokenizer.from_pretrained("MayaPH/FinOPT-Washington")
|
|
@@ -34,6 +38,8 @@ tokenizer = AutoTokenizer.from_pretrained("MayaPH/FinOPT-Washington")
|
|
| 34 |
model = AutoModelForCausalLM.from_pretrained("MayaPH/FinOPT-Washington")
|
| 35 |
```
|
| 36 |
|
|
|
|
|
|
|
| 37 |
## Limitations and Caveats
|
| 38 |
While FinOPT-Washington has been fine-tuned on a financial question-answering dataset, it is important to note the following limitations and caveats:
|
| 39 |
|
|
|
|
| 1 |
---
|
| 2 |
+
license: cc-by-sa-4.0
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
---
|
| 5 |
|
|
|
|
| 24 |
The model is intended to be used by individuals seeking information about financial topics, as well as developers and researchers working on natural language processing (NLP) tasks in the financial domain.
|
| 25 |
|
| 26 |
## Usage
|
| 27 |
+
To use FinOPT-Washington, you are required to provide attribution in accordance with the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. Please include the following attribution notice when utilizing FinOPT-Washington in your work:
|
| 28 |
|
| 29 |
```python
|
| 30 |
+
# This code uses FinOPT-Washington, a language model developed by MayaPH.
|
| 31 |
+
# The model is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.
|
| 32 |
+
# For more information, visit: https://creativecommons.org/licenses/by-sa/4.0/
|
| 33 |
+
|
| 34 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 35 |
|
| 36 |
tokenizer = AutoTokenizer.from_pretrained("MayaPH/FinOPT-Washington")
|
|
|
|
| 38 |
model = AutoModelForCausalLM.from_pretrained("MayaPH/FinOPT-Washington")
|
| 39 |
```
|
| 40 |
|
| 41 |
+
Please ensure that you include the relevant attribution notice in your code or any other form of usage to comply with the license terms.
|
| 42 |
+
|
| 43 |
## Limitations and Caveats
|
| 44 |
While FinOPT-Washington has been fine-tuned on a financial question-answering dataset, it is important to note the following limitations and caveats:
|
| 45 |
|