Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use JYL480/Test_DistBERTModel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JYL480/Test_DistBERTModel with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JYL480/Test_DistBERTModel")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JYL480/Test_DistBERTModel") model = AutoModelForCausalLM.from_pretrained("JYL480/Test_DistBERTModel") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JYL480/Test_DistBERTModel with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JYL480/Test_DistBERTModel" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JYL480/Test_DistBERTModel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JYL480/Test_DistBERTModel
- SGLang
How to use JYL480/Test_DistBERTModel 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 "JYL480/Test_DistBERTModel" \ --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": "JYL480/Test_DistBERTModel", "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 "JYL480/Test_DistBERTModel" \ --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": "JYL480/Test_DistBERTModel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JYL480/Test_DistBERTModel with Docker Model Runner:
docker model run hf.co/JYL480/Test_DistBERTModel
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 |
|
|
@@ -42,15 +42,17 @@ The following hyperparameters were used during training:
|
|
| 42 |
- seed: 42
|
| 43 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 44 |
- lr_scheduler_type: linear
|
| 45 |
-
- num_epochs:
|
| 46 |
|
| 47 |
### Training results
|
| 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.7960
|
| 21 |
|
| 22 |
## Model description
|
| 23 |
|
|
|
|
| 42 |
- seed: 42
|
| 43 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 44 |
- lr_scheduler_type: linear
|
| 45 |
+
- num_epochs: 5
|
| 46 |
|
| 47 |
### Training results
|
| 48 |
|
| 49 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 50 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 51 |
+
| 3.9536 | 1.0 | 1297 | 3.8110 |
|
| 52 |
+
| 3.8647 | 2.0 | 2594 | 3.7992 |
|
| 53 |
+
| 3.8013 | 3.0 | 3891 | 3.7953 |
|
| 54 |
+
| 3.7728 | 4.0 | 5188 | 3.7968 |
|
| 55 |
+
| 3.7431 | 5.0 | 6485 | 3.7960 |
|
| 56 |
|
| 57 |
|
| 58 |
### Framework versions
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 327657928
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a6bdd90c36c9135bb34c5a7c3684e63aa67c038d56a2949c84425bfcbf37c24
|
| 3 |
size 327657928
|
runs/Jul10_07-26-37_fdac1b9d0fac/events.out.tfevents.1720596398.fdac1b9d0fac.1598.2
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:9ae183bec99be81e3b04ca85453467c46cbe68111f85057806e40b575f2f3c26
|
| 3 |
+
size 9400
|
runs/Jul10_07-26-37_fdac1b9d0fac/events.out.tfevents.1720598045.fdac1b9d0fac.1598.3
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e8221c9ffe1f288ad605a9f51d2791f72586082895909fb1322e53d9d57adf2
|
| 3 |
+
size 359
|