Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use GPT-JF/Model_1A_Clinton with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GPT-JF/Model_1A_Clinton with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GPT-JF/Model_1A_Clinton")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GPT-JF/Model_1A_Clinton") model = AutoModelForCausalLM.from_pretrained("GPT-JF/Model_1A_Clinton") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use GPT-JF/Model_1A_Clinton with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GPT-JF/Model_1A_Clinton" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GPT-JF/Model_1A_Clinton", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GPT-JF/Model_1A_Clinton
- SGLang
How to use GPT-JF/Model_1A_Clinton 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 "GPT-JF/Model_1A_Clinton" \ --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": "GPT-JF/Model_1A_Clinton", "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 "GPT-JF/Model_1A_Clinton" \ --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": "GPT-JF/Model_1A_Clinton", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GPT-JF/Model_1A_Clinton with Docker Model Runner:
docker model run hf.co/GPT-JF/Model_1A_Clinton
End of training
Browse files- all_results.json +8 -0
- train_results.json +8 -0
- trainer_state.json +41 -0
all_results.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 5.0,
|
| 3 |
+
"train_loss": 2.838261835865429,
|
| 4 |
+
"train_runtime": 580.6833,
|
| 5 |
+
"train_samples": 1083,
|
| 6 |
+
"train_samples_per_second": 9.325,
|
| 7 |
+
"train_steps_per_second": 2.333
|
| 8 |
+
}
|
train_results.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 5.0,
|
| 3 |
+
"train_loss": 2.838261835865429,
|
| 4 |
+
"train_runtime": 580.6833,
|
| 5 |
+
"train_samples": 1083,
|
| 6 |
+
"train_samples_per_second": 9.325,
|
| 7 |
+
"train_steps_per_second": 2.333
|
| 8 |
+
}
|
trainer_state.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": null,
|
| 3 |
+
"best_model_checkpoint": null,
|
| 4 |
+
"epoch": 5.0,
|
| 5 |
+
"eval_steps": 500,
|
| 6 |
+
"global_step": 1355,
|
| 7 |
+
"is_hyper_param_search": false,
|
| 8 |
+
"is_local_process_zero": true,
|
| 9 |
+
"is_world_process_zero": true,
|
| 10 |
+
"log_history": [
|
| 11 |
+
{
|
| 12 |
+
"epoch": 1.85,
|
| 13 |
+
"learning_rate": 3.1549815498154986e-05,
|
| 14 |
+
"loss": 2.9715,
|
| 15 |
+
"step": 500
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"epoch": 3.69,
|
| 19 |
+
"learning_rate": 1.3099630996309964e-05,
|
| 20 |
+
"loss": 2.7861,
|
| 21 |
+
"step": 1000
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"epoch": 5.0,
|
| 25 |
+
"step": 1355,
|
| 26 |
+
"total_flos": 2829792706560000.0,
|
| 27 |
+
"train_loss": 2.838261835865429,
|
| 28 |
+
"train_runtime": 580.6833,
|
| 29 |
+
"train_samples_per_second": 9.325,
|
| 30 |
+
"train_steps_per_second": 2.333
|
| 31 |
+
}
|
| 32 |
+
],
|
| 33 |
+
"logging_steps": 500,
|
| 34 |
+
"max_steps": 1355,
|
| 35 |
+
"num_input_tokens_seen": 0,
|
| 36 |
+
"num_train_epochs": 5,
|
| 37 |
+
"save_steps": 500,
|
| 38 |
+
"total_flos": 2829792706560000.0,
|
| 39 |
+
"trial_name": null,
|
| 40 |
+
"trial_params": null
|
| 41 |
+
}
|