Instructions to use NasimB/gpt2-concat-second with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NasimB/gpt2-concat-second with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NasimB/gpt2-concat-second")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NasimB/gpt2-concat-second") model = AutoModelForCausalLM.from_pretrained("NasimB/gpt2-concat-second") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use NasimB/gpt2-concat-second with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NasimB/gpt2-concat-second" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NasimB/gpt2-concat-second", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NasimB/gpt2-concat-second
- SGLang
How to use NasimB/gpt2-concat-second 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 "NasimB/gpt2-concat-second" \ --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": "NasimB/gpt2-concat-second", "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 "NasimB/gpt2-concat-second" \ --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": "NasimB/gpt2-concat-second", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NasimB/gpt2-concat-second with Docker Model Runner:
docker model run hf.co/NasimB/gpt2-concat-second
update model card README.md
Browse files
README.md
CHANGED
|
@@ -16,7 +16,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 16 |
|
| 17 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the generator dataset.
|
| 18 |
It achieves the following results on the evaluation set:
|
| 19 |
-
- Loss: 4.
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
@@ -49,40 +49,40 @@ The following hyperparameters were used during training:
|
|
| 49 |
|
| 50 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 51 |
|:-------------:|:-----:|:-----:|:---------------:|
|
| 52 |
-
| 6.
|
| 53 |
-
| 5.
|
| 54 |
-
| 4.
|
| 55 |
-
| 4.
|
| 56 |
-
| 4.
|
| 57 |
-
| 4.
|
| 58 |
-
| 4.
|
| 59 |
-
| 4.
|
| 60 |
-
| 4.
|
| 61 |
-
| 4.
|
| 62 |
-
| 3.
|
| 63 |
-
| 3.
|
| 64 |
-
| 3.
|
| 65 |
-
| 3.
|
| 66 |
-
| 3.
|
| 67 |
-
| 3.
|
| 68 |
-
| 3.
|
| 69 |
-
| 3.
|
| 70 |
-
| 3.
|
| 71 |
-
| 3.
|
| 72 |
-
| 3.
|
| 73 |
-
| 3.
|
| 74 |
-
| 3.
|
| 75 |
-
| 3.
|
| 76 |
-
| 2.
|
| 77 |
-
| 2.
|
| 78 |
-
| 2.
|
| 79 |
-
| 2.
|
| 80 |
-
| 2.
|
| 81 |
-
| 2.
|
| 82 |
-
| 2.
|
| 83 |
-
| 2.
|
| 84 |
-
| 2.
|
| 85 |
-
| 2.
|
| 86 |
|
| 87 |
|
| 88 |
### Framework versions
|
|
|
|
| 16 |
|
| 17 |
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on the generator dataset.
|
| 18 |
It achieves the following results on the evaluation set:
|
| 19 |
+
- Loss: 4.4031
|
| 20 |
|
| 21 |
## Model description
|
| 22 |
|
|
|
|
| 49 |
|
| 50 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 51 |
|:-------------:|:-----:|:-----:|:---------------:|
|
| 52 |
+
| 6.7063 | 0.29 | 500 | 5.6161 |
|
| 53 |
+
| 5.3409 | 0.58 | 1000 | 5.1879 |
|
| 54 |
+
| 4.9975 | 0.87 | 1500 | 4.9292 |
|
| 55 |
+
| 4.7248 | 1.16 | 2000 | 4.7819 |
|
| 56 |
+
| 4.5625 | 1.45 | 2500 | 4.6577 |
|
| 57 |
+
| 4.4518 | 1.74 | 3000 | 4.5536 |
|
| 58 |
+
| 4.3506 | 2.02 | 3500 | 4.4718 |
|
| 59 |
+
| 4.1444 | 2.31 | 4000 | 4.4324 |
|
| 60 |
+
| 4.1299 | 2.6 | 4500 | 4.3859 |
|
| 61 |
+
| 4.097 | 2.89 | 5000 | 4.3383 |
|
| 62 |
+
| 3.9322 | 3.18 | 5500 | 4.3372 |
|
| 63 |
+
| 3.8738 | 3.47 | 6000 | 4.3092 |
|
| 64 |
+
| 3.8743 | 3.76 | 6500 | 4.2795 |
|
| 65 |
+
| 3.8147 | 4.05 | 7000 | 4.2758 |
|
| 66 |
+
| 3.6152 | 4.34 | 7500 | 4.2857 |
|
| 67 |
+
| 3.6479 | 4.63 | 8000 | 4.2632 |
|
| 68 |
+
| 3.654 | 4.92 | 8500 | 4.2380 |
|
| 69 |
+
| 3.4411 | 5.21 | 9000 | 4.2846 |
|
| 70 |
+
| 3.398 | 5.49 | 9500 | 4.2785 |
|
| 71 |
+
| 3.4249 | 5.78 | 10000 | 4.2628 |
|
| 72 |
+
| 3.3498 | 6.07 | 10500 | 4.2910 |
|
| 73 |
+
| 3.1525 | 6.36 | 11000 | 4.3119 |
|
| 74 |
+
| 3.1727 | 6.65 | 11500 | 4.3057 |
|
| 75 |
+
| 3.1862 | 6.94 | 12000 | 4.2985 |
|
| 76 |
+
| 2.9723 | 7.23 | 12500 | 4.3475 |
|
| 77 |
+
| 2.9448 | 7.52 | 13000 | 4.3551 |
|
| 78 |
+
| 2.9617 | 7.81 | 13500 | 4.3526 |
|
| 79 |
+
| 2.8946 | 8.1 | 14000 | 4.3748 |
|
| 80 |
+
| 2.7783 | 8.39 | 14500 | 4.3866 |
|
| 81 |
+
| 2.7819 | 8.68 | 15000 | 4.3904 |
|
| 82 |
+
| 2.7913 | 8.96 | 15500 | 4.3905 |
|
| 83 |
+
| 2.7052 | 9.25 | 16000 | 4.4009 |
|
| 84 |
+
| 2.6969 | 9.54 | 16500 | 4.4029 |
|
| 85 |
+
| 2.7 | 9.83 | 17000 | 4.4031 |
|
| 86 |
|
| 87 |
|
| 88 |
### Framework versions
|