Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use Pyro-X2/casual_lm_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Pyro-X2/casual_lm_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Pyro-X2/casual_lm_model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Pyro-X2/casual_lm_model") model = AutoModelForCausalLM.from_pretrained("Pyro-X2/casual_lm_model") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Pyro-X2/casual_lm_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Pyro-X2/casual_lm_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Pyro-X2/casual_lm_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Pyro-X2/casual_lm_model
- SGLang
How to use Pyro-X2/casual_lm_model 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 "Pyro-X2/casual_lm_model" \ --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": "Pyro-X2/casual_lm_model", "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 "Pyro-X2/casual_lm_model" \ --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": "Pyro-X2/casual_lm_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Pyro-X2/casual_lm_model with Docker Model Runner:
docker model run hf.co/Pyro-X2/casual_lm_model
End of training
Browse files
README.md
CHANGED
|
@@ -17,7 +17,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 17 |
|
| 18 |
This model is a fine-tuned version of [distilbert/distilgpt2](https://huggingface.co/distilbert/distilgpt2) on the eli5_category dataset.
|
| 19 |
It achieves the following results on the evaluation set:
|
| 20 |
-
- Loss: 3.
|
| 21 |
|
| 22 |
## Model description
|
| 23 |
|
|
@@ -48,9 +48,9 @@ The following hyperparameters were used during training:
|
|
| 48 |
|
| 49 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 50 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 51 |
-
| 3.
|
| 52 |
-
| 3.
|
| 53 |
-
| 3.
|
| 54 |
|
| 55 |
|
| 56 |
### Framework versions
|
|
|
|
| 17 |
|
| 18 |
This model is a fine-tuned version of [distilbert/distilgpt2](https://huggingface.co/distilbert/distilgpt2) on the eli5_category dataset.
|
| 19 |
It achieves the following results on the evaluation set:
|
| 20 |
+
- Loss: 3.7078
|
| 21 |
|
| 22 |
## Model description
|
| 23 |
|
|
|
|
| 48 |
|
| 49 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 50 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 51 |
+
| 3.743 | 1.0 | 500 | 3.7099 |
|
| 52 |
+
| 3.7019 | 2.0 | 1000 | 3.7074 |
|
| 53 |
+
| 3.6787 | 3.0 | 1500 | 3.7078 |
|
| 54 |
|
| 55 |
|
| 56 |
### Framework versions
|
runs/Jul15_20-08-42_600aa654b321/events.out.tfevents.1721074487.600aa654b321.2882.1
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3bab0d5c3cc369d415f320208b2045913d97ea1c01fc998f7a7a68572aa99cab
|
| 3 |
+
size 7257
|
runs/Jul15_20-08-42_600aa654b321/events.out.tfevents.1721075553.600aa654b321.2882.2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87f0e97bfd21a369dc9e093074e21eea6b2b911f2887094208bdc8157be5bf43
|
| 3 |
+
size 359
|