Instructions to use nlparabic/test-clm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nlparabic/test-clm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nlparabic/test-clm")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nlparabic/test-clm") model = AutoModelForCausalLM.from_pretrained("nlparabic/test-clm", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nlparabic/test-clm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nlparabic/test-clm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nlparabic/test-clm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nlparabic/test-clm
- SGLang
How to use nlparabic/test-clm 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 "nlparabic/test-clm" \ --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": "nlparabic/test-clm", "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 "nlparabic/test-clm" \ --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": "nlparabic/test-clm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nlparabic/test-clm with Docker Model Runner:
docker model run hf.co/nlparabic/test-clm
End of training
Browse files- README.md +5 -0
- all_results.json +16 -0
- eval_results.json +10 -0
- train_results.json +9 -0
- trainer_state.json +42 -0
README.md
CHANGED
|
@@ -3,6 +3,8 @@ license: mit
|
|
| 3 |
base_model: openai-community/gpt2
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
|
|
|
|
|
|
| 6 |
model-index:
|
| 7 |
- name: test-clm
|
| 8 |
results: []
|
|
@@ -14,6 +16,9 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 14 |
# test-clm
|
| 15 |
|
| 16 |
This model is a fine-tuned version of [openai-community/gpt2](https://huggingface.co/openai-community/gpt2) on an unknown dataset.
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Model description
|
| 19 |
|
|
|
|
| 3 |
base_model: openai-community/gpt2
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
+
metrics:
|
| 7 |
+
- accuracy
|
| 8 |
model-index:
|
| 9 |
- name: test-clm
|
| 10 |
results: []
|
|
|
|
| 16 |
# test-clm
|
| 17 |
|
| 18 |
This model is a fine-tuned version of [openai-community/gpt2](https://huggingface.co/openai-community/gpt2) on an unknown dataset.
|
| 19 |
+
It achieves the following results on the evaluation set:
|
| 20 |
+
- Loss: 2.3172
|
| 21 |
+
- Accuracy: 0.4016
|
| 22 |
|
| 23 |
## Model description
|
| 24 |
|
all_results.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 3.0,
|
| 3 |
+
"eval_accuracy": 0.401569968863746,
|
| 4 |
+
"eval_loss": 2.3171780109405518,
|
| 5 |
+
"eval_runtime": 44.5797,
|
| 6 |
+
"eval_samples": 2073,
|
| 7 |
+
"eval_samples_per_second": 46.501,
|
| 8 |
+
"eval_steps_per_second": 5.832,
|
| 9 |
+
"perplexity": 10.146999144035705,
|
| 10 |
+
"total_flos": 863831457792000.0,
|
| 11 |
+
"train_loss": 2.8772476859714673,
|
| 12 |
+
"train_runtime": 100.158,
|
| 13 |
+
"train_samples": 551,
|
| 14 |
+
"train_samples_per_second": 16.504,
|
| 15 |
+
"train_steps_per_second": 2.067
|
| 16 |
+
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 3.0,
|
| 3 |
+
"eval_accuracy": 0.401569968863746,
|
| 4 |
+
"eval_loss": 2.3171780109405518,
|
| 5 |
+
"eval_runtime": 44.5797,
|
| 6 |
+
"eval_samples": 2073,
|
| 7 |
+
"eval_samples_per_second": 46.501,
|
| 8 |
+
"eval_steps_per_second": 5.832,
|
| 9 |
+
"perplexity": 10.146999144035705
|
| 10 |
+
}
|
train_results.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 3.0,
|
| 3 |
+
"total_flos": 863831457792000.0,
|
| 4 |
+
"train_loss": 2.8772476859714673,
|
| 5 |
+
"train_runtime": 100.158,
|
| 6 |
+
"train_samples": 551,
|
| 7 |
+
"train_samples_per_second": 16.504,
|
| 8 |
+
"train_steps_per_second": 2.067
|
| 9 |
+
}
|
trainer_state.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": null,
|
| 3 |
+
"best_model_checkpoint": null,
|
| 4 |
+
"epoch": 3.0,
|
| 5 |
+
"eval_steps": 500,
|
| 6 |
+
"global_step": 207,
|
| 7 |
+
"is_hyper_param_search": false,
|
| 8 |
+
"is_local_process_zero": true,
|
| 9 |
+
"is_world_process_zero": true,
|
| 10 |
+
"log_history": [
|
| 11 |
+
{
|
| 12 |
+
"epoch": 3.0,
|
| 13 |
+
"step": 207,
|
| 14 |
+
"total_flos": 863831457792000.0,
|
| 15 |
+
"train_loss": 2.8772476859714673,
|
| 16 |
+
"train_runtime": 100.158,
|
| 17 |
+
"train_samples_per_second": 16.504,
|
| 18 |
+
"train_steps_per_second": 2.067
|
| 19 |
+
}
|
| 20 |
+
],
|
| 21 |
+
"logging_steps": 500,
|
| 22 |
+
"max_steps": 207,
|
| 23 |
+
"num_input_tokens_seen": 0,
|
| 24 |
+
"num_train_epochs": 3,
|
| 25 |
+
"save_steps": 500,
|
| 26 |
+
"stateful_callbacks": {
|
| 27 |
+
"TrainerControl": {
|
| 28 |
+
"args": {
|
| 29 |
+
"should_epoch_stop": false,
|
| 30 |
+
"should_evaluate": false,
|
| 31 |
+
"should_log": false,
|
| 32 |
+
"should_save": true,
|
| 33 |
+
"should_training_stop": true
|
| 34 |
+
},
|
| 35 |
+
"attributes": {}
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"total_flos": 863831457792000.0,
|
| 39 |
+
"train_batch_size": 8,
|
| 40 |
+
"trial_name": null,
|
| 41 |
+
"trial_params": null
|
| 42 |
+
}
|