Instructions to use Rocketknight1/distilgpt2-finetuned-wikitext2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rocketknight1/distilgpt2-finetuned-wikitext2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rocketknight1/distilgpt2-finetuned-wikitext2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Rocketknight1/distilgpt2-finetuned-wikitext2") model = AutoModelForCausalLM.from_pretrained("Rocketknight1/distilgpt2-finetuned-wikitext2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rocketknight1/distilgpt2-finetuned-wikitext2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rocketknight1/distilgpt2-finetuned-wikitext2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rocketknight1/distilgpt2-finetuned-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Rocketknight1/distilgpt2-finetuned-wikitext2
- SGLang
How to use Rocketknight1/distilgpt2-finetuned-wikitext2 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 "Rocketknight1/distilgpt2-finetuned-wikitext2" \ --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": "Rocketknight1/distilgpt2-finetuned-wikitext2", "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 "Rocketknight1/distilgpt2-finetuned-wikitext2" \ --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": "Rocketknight1/distilgpt2-finetuned-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Rocketknight1/distilgpt2-finetuned-wikitext2 with Docker Model Runner:
docker model run hf.co/Rocketknight1/distilgpt2-finetuned-wikitext2
Commit ·
d65da79
1
Parent(s): dfeb5f2
Training in progress epoch 0
Browse files
README.md
CHANGED
|
@@ -14,8 +14,8 @@ probably proofread and complete it, then remove this comment. -->
|
|
| 14 |
|
| 15 |
This model is a fine-tuned version of [distilgpt2](https://huggingface.co/distilgpt2) on an unknown dataset.
|
| 16 |
It achieves the following results on the evaluation set:
|
| 17 |
-
- Train Loss: 3.
|
| 18 |
-
- Validation Loss: 3.
|
| 19 |
- Epoch: 0
|
| 20 |
|
| 21 |
## Model description
|
|
@@ -42,7 +42,7 @@ The following hyperparameters were used during training:
|
|
| 42 |
|
| 43 |
| Train Loss | Validation Loss | Epoch |
|
| 44 |
|:----------:|:---------------:|:-----:|
|
| 45 |
-
| 3.
|
| 46 |
|
| 47 |
|
| 48 |
### Framework versions
|
|
|
|
| 14 |
|
| 15 |
This model is a fine-tuned version of [distilgpt2](https://huggingface.co/distilgpt2) on an unknown dataset.
|
| 16 |
It achieves the following results on the evaluation set:
|
| 17 |
+
- Train Loss: 3.8577
|
| 18 |
+
- Validation Loss: 3.6752
|
| 19 |
- Epoch: 0
|
| 20 |
|
| 21 |
## Model description
|
|
|
|
| 42 |
|
| 43 |
| Train Loss | Validation Loss | Epoch |
|
| 44 |
|:----------:|:---------------:|:-----:|
|
| 45 |
+
| 3.8577 | 3.6752 | 0 |
|
| 46 |
|
| 47 |
|
| 48 |
### Framework versions
|
logs/train/events.out.tfevents.1643376063.matt-TRX40-AORUS-PRO-WIFI.13769.0.v2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:66f766875185e75ce470ee93a142338c86e4f5894370aeb02f4c166d623d83e4
|
| 3 |
+
size 1201176
|
logs/validation/events.out.tfevents.1643376187.matt-TRX40-AORUS-PRO-WIFI.13769.1.v2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03ec5cbe80f7231bb621c27a440b20cf2267ec798d17002954977cba0d32c9e2
|
| 3 |
+
size 194
|
tf_model.h5
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 327745496
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06fb2edd6d26a67275923f4ae3627356be6d186b21f36d7818fa6784a36362b1
|
| 3 |
size 327745496
|