Instructions to use NaughtyDog97/DFE-GPS-34B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NaughtyDog97/DFE-GPS-34B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NaughtyDog97/DFE-GPS-34B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("NaughtyDog97/DFE-GPS-34B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NaughtyDog97/DFE-GPS-34B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NaughtyDog97/DFE-GPS-34B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NaughtyDog97/DFE-GPS-34B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NaughtyDog97/DFE-GPS-34B
- SGLang
How to use NaughtyDog97/DFE-GPS-34B 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 "NaughtyDog97/DFE-GPS-34B" \ --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": "NaughtyDog97/DFE-GPS-34B", "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 "NaughtyDog97/DFE-GPS-34B" \ --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": "NaughtyDog97/DFE-GPS-34B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NaughtyDog97/DFE-GPS-34B with Docker Model Runner:
docker model run hf.co/NaughtyDog97/DFE-GPS-34B
111
Browse files
README.md
CHANGED
|
@@ -36,7 +36,9 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 36 |
trust_remote_code=True)
|
| 37 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 38 |
'NaughtyDog97/FormalEnhencedGPS-34B',
|
| 39 |
-
|
|
|
|
|
|
|
| 40 |
|
| 41 |
# text prompt
|
| 42 |
img_path = 'sample/4927.png'
|
|
@@ -140,6 +142,8 @@ formalization_model = AutoModelForCausalLM.from_pretrained(
|
|
| 140 |
|
| 141 |
formalization_tokenizer = AutoTokenizer.from_pretrained(
|
| 142 |
'NaughtyDog97/GeoFormalizer',
|
|
|
|
|
|
|
| 143 |
trust_remote_code=True)
|
| 144 |
|
| 145 |
|
|
@@ -150,6 +154,7 @@ reason_model = AutoModelForCausalLM.from_pretrained(
|
|
| 150 |
trust_remote_code=True)
|
| 151 |
reason_tokenizer = AutoTokenizer.from_pretrained(
|
| 152 |
'NaughtyDog97/FormalEnhencedGPS-34B',
|
|
|
|
| 153 |
trust_remote_code=True)
|
| 154 |
|
| 155 |
|
|
|
|
| 36 |
trust_remote_code=True)
|
| 37 |
tokenizer = AutoTokenizer.from_pretrained(
|
| 38 |
'NaughtyDog97/FormalEnhencedGPS-34B',
|
| 39 |
+
use_fast=False,
|
| 40 |
+
trust_remote_code=True,
|
| 41 |
+
)
|
| 42 |
|
| 43 |
# text prompt
|
| 44 |
img_path = 'sample/4927.png'
|
|
|
|
| 142 |
|
| 143 |
formalization_tokenizer = AutoTokenizer.from_pretrained(
|
| 144 |
'NaughtyDog97/GeoFormalizer',
|
| 145 |
+
use_fast=True,
|
| 146 |
+
padding_side="right",
|
| 147 |
trust_remote_code=True)
|
| 148 |
|
| 149 |
|
|
|
|
| 154 |
trust_remote_code=True)
|
| 155 |
reason_tokenizer = AutoTokenizer.from_pretrained(
|
| 156 |
'NaughtyDog97/FormalEnhencedGPS-34B',
|
| 157 |
+
use_fast=False,
|
| 158 |
trust_remote_code=True)
|
| 159 |
|
| 160 |
|