Instructions to use Lakoc/TED_CLM_gpt2_tedlium3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lakoc/TED_CLM_gpt2_tedlium3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Lakoc/TED_CLM_gpt2_tedlium3")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Lakoc/TED_CLM_gpt2_tedlium3") model = AutoModelForCausalLM.from_pretrained("Lakoc/TED_CLM_gpt2_tedlium3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Lakoc/TED_CLM_gpt2_tedlium3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lakoc/TED_CLM_gpt2_tedlium3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lakoc/TED_CLM_gpt2_tedlium3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Lakoc/TED_CLM_gpt2_tedlium3
- SGLang
How to use Lakoc/TED_CLM_gpt2_tedlium3 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 "Lakoc/TED_CLM_gpt2_tedlium3" \ --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": "Lakoc/TED_CLM_gpt2_tedlium3", "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 "Lakoc/TED_CLM_gpt2_tedlium3" \ --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": "Lakoc/TED_CLM_gpt2_tedlium3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Lakoc/TED_CLM_gpt2_tedlium3 with Docker Model Runner:
docker model run hf.co/Lakoc/TED_CLM_gpt2_tedlium3
TED_CLM_gpt2_tedlium3
This model is a fine-tuned version of on the None dataset. It achieves the following results on the evaluation set:
- Loss: 1.9050
- Accuracy: 0.5485
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.005
- train_batch_size: 128
- eval_batch_size: 128
- seed: 42
- distributed_type: multi-GPU
- num_devices: 4
- total_train_batch_size: 512
- total_eval_batch_size: 512
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 20000
- num_epochs: 15.0
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 2.1262 | 0.32 | 3000 | 2.2962 | 0.4720 |
| 2.0093 | 0.64 | 6000 | 2.1561 | 0.5021 |
| 1.9577 | 0.95 | 9000 | 2.0887 | 0.5157 |
| 1.9242 | 1.27 | 12000 | 2.0712 | 0.5188 |
| 1.9146 | 1.59 | 15000 | 2.0415 | 0.5194 |
| 1.9342 | 1.91 | 18000 | 2.0610 | 0.5192 |
| 1.8756 | 2.23 | 21000 | 2.0033 | 0.5284 |
| 1.8586 | 2.55 | 24000 | 1.9736 | 0.5354 |
| 1.8304 | 2.86 | 27000 | 1.9478 | 0.5383 |
| 1.8046 | 3.18 | 30000 | 1.9299 | 0.5412 |
| 1.7777 | 3.5 | 33000 | 1.9122 | 0.5470 |
| 1.7742 | 3.82 | 36000 | 1.9050 | 0.5485 |
| 1.7715 | 4.14 | 39000 | 1.9050 | 0.5485 |
| 1.7694 | 4.45 | 42000 | 1.9050 | 0.5485 |
| 1.7671 | 4.77 | 45000 | 1.9050 | 0.5485 |
| 1.768 | 5.09 | 48000 | 1.9050 | 0.5485 |
| 1.7582 | 5.41 | 51000 | 1.9050 | 0.5485 |
Framework versions
- Transformers 4.31.0.dev0
- Pytorch 2.1.0+cu121
- Datasets 2.13.1
- Tokenizers 0.13.3
- Downloads last month
- 12