Text Generation
Transformers
PyTorch
TensorBoard
gpt2
Generated from Trainer
text-generation-inference
Instructions to use tvergho/highlight_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tvergho/highlight_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tvergho/highlight_model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tvergho/highlight_model") model = AutoModelForCausalLM.from_pretrained("tvergho/highlight_model") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use tvergho/highlight_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tvergho/highlight_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tvergho/highlight_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tvergho/highlight_model
- SGLang
How to use tvergho/highlight_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 "tvergho/highlight_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": "tvergho/highlight_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 "tvergho/highlight_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": "tvergho/highlight_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tvergho/highlight_model with Docker Model Runner:
docker model run hf.co/tvergho/highlight_model
update model card README.md
Browse files
README.md
CHANGED
|
@@ -12,9 +12,9 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 12 |
|
| 13 |
# highlight_model
|
| 14 |
|
| 15 |
-
This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2) on an unknown dataset.
|
| 16 |
It achieves the following results on the evaluation set:
|
| 17 |
-
- Loss:
|
| 18 |
|
| 19 |
## Model description
|
| 20 |
|
|
@@ -37,6 +37,8 @@ The following hyperparameters were used during training:
|
|
| 37 |
- train_batch_size: 2
|
| 38 |
- eval_batch_size: 2
|
| 39 |
- seed: 42
|
|
|
|
|
|
|
| 40 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 41 |
- lr_scheduler_type: linear
|
| 42 |
- num_epochs: 4
|
|
@@ -46,15 +48,15 @@ The following hyperparameters were used during training:
|
|
| 46 |
|
| 47 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 48 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 49 |
-
| No log |
|
| 50 |
-
| No log |
|
| 51 |
-
| No log |
|
| 52 |
-
| No log |
|
| 53 |
|
| 54 |
|
| 55 |
### Framework versions
|
| 56 |
|
| 57 |
-
- Transformers 4.
|
| 58 |
-
- Pytorch 1.
|
| 59 |
-
- Datasets 2.
|
| 60 |
-
- Tokenizers 0.
|
|
|
|
| 12 |
|
| 13 |
# highlight_model
|
| 14 |
|
| 15 |
+
This model is a fine-tuned version of [gpt2-medium](https://huggingface.co/gpt2-medium) on an unknown dataset.
|
| 16 |
It achieves the following results on the evaluation set:
|
| 17 |
+
- Loss: 2.8965
|
| 18 |
|
| 19 |
## Model description
|
| 20 |
|
|
|
|
| 37 |
- train_batch_size: 2
|
| 38 |
- eval_batch_size: 2
|
| 39 |
- seed: 42
|
| 40 |
+
- gradient_accumulation_steps: 4
|
| 41 |
+
- total_train_batch_size: 8
|
| 42 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 43 |
- lr_scheduler_type: linear
|
| 44 |
- num_epochs: 4
|
|
|
|
| 48 |
|
| 49 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 50 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 51 |
+
| No log | 0.98 | 22 | 3.0073 |
|
| 52 |
+
| No log | 1.98 | 44 | 2.7684 |
|
| 53 |
+
| No log | 2.98 | 66 | 2.8394 |
|
| 54 |
+
| No log | 3.98 | 88 | 2.8965 |
|
| 55 |
|
| 56 |
|
| 57 |
### Framework versions
|
| 58 |
|
| 59 |
+
- Transformers 4.20.1
|
| 60 |
+
- Pytorch 1.11.0
|
| 61 |
+
- Datasets 2.1.0
|
| 62 |
+
- Tokenizers 0.12.1
|