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.7245
|
| 21 |
|
| 22 |
## Model description
|
| 23 |
|
|
|
|
| 48 |
|
| 49 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 50 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 51 |
+
| 3.866 | 1.0 | 500 | 3.7400 |
|
| 52 |
+
| 3.7814 | 2.0 | 1000 | 3.7267 |
|
| 53 |
+
| 3.7498 | 3.0 | 1500 | 3.7245 |
|
| 54 |
|
| 55 |
|
| 56 |
### Framework versions
|
runs/Jul15_21-18-24_b55a46f00eed/events.out.tfevents.1721078348.b55a46f00eed.3144.0
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:93ec3800a1be5ee64f1c6369d9ce1dd1e9e5cc2634d475b82772a509ee7b5dab
|
| 3 |
+
size 6958
|
runs/Jul15_21-18-24_b55a46f00eed/events.out.tfevents.1721078819.b55a46f00eed.3144.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d8a3189d23343c8a5e001afa14f310764af7d055fe2ada0123aba4fb78b43d68
|
| 3 |
+
size 359
|