jhonparra18/petrogustavo-tweets
Viewer • Updated • 69.9k • 12
How to use jhonparra18/petro-twitter-assistant-30ep-large with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="jhonparra18/petro-twitter-assistant-30ep-large") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("jhonparra18/petro-twitter-assistant-30ep-large")
model = AutoModelForCausalLM.from_pretrained("jhonparra18/petro-twitter-assistant-30ep-large", device_map="auto")How to use jhonparra18/petro-twitter-assistant-30ep-large with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "jhonparra18/petro-twitter-assistant-30ep-large"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "jhonparra18/petro-twitter-assistant-30ep-large",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/jhonparra18/petro-twitter-assistant-30ep-large
How to use jhonparra18/petro-twitter-assistant-30ep-large with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "jhonparra18/petro-twitter-assistant-30ep-large" \
--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": "jhonparra18/petro-twitter-assistant-30ep-large",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "jhonparra18/petro-twitter-assistant-30ep-large" \
--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": "jhonparra18/petro-twitter-assistant-30ep-large",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use jhonparra18/petro-twitter-assistant-30ep-large with Docker Model Runner:
docker model run hf.co/jhonparra18/petro-twitter-assistant-30ep-large
This model is a fine-tuned version of flax-community/gpt-2-spanish on an unknown dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 3.4824 | 0.73 | 1000 | 3.3659 |
| 3.2393 | 1.46 | 2000 | 3.2667 |
| 3.113 | 2.19 | 3000 | 3.2174 |
| 3.0121 | 2.92 | 4000 | 3.1767 |
| 2.9076 | 3.65 | 5000 | 3.1619 |
| 2.8358 | 4.38 | 6000 | 3.1665 |
| 2.7708 | 5.11 | 7000 | 3.1874 |
| 2.6846 | 5.84 | 8000 | 3.1695 |
| 2.6092 | 6.57 | 9000 | 3.2114 |
| 2.5487 | 7.3 | 10000 | 3.2517 |
| 2.4942 | 8.04 | 11000 | 3.3050 |