Instructions to use Lakoc/TED_CLM_gpt2_tedlium4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lakoc/TED_CLM_gpt2_tedlium4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Lakoc/TED_CLM_gpt2_tedlium4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Lakoc/TED_CLM_gpt2_tedlium4") model = AutoModelForCausalLM.from_pretrained("Lakoc/TED_CLM_gpt2_tedlium4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Lakoc/TED_CLM_gpt2_tedlium4 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_tedlium4" # 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_tedlium4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Lakoc/TED_CLM_gpt2_tedlium4
- SGLang
How to use Lakoc/TED_CLM_gpt2_tedlium4 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_tedlium4" \ --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_tedlium4", "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_tedlium4" \ --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_tedlium4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Lakoc/TED_CLM_gpt2_tedlium4 with Docker Model Runner:
docker model run hf.co/Lakoc/TED_CLM_gpt2_tedlium4
TED_CLM_gpt2_tedlium4
This model is a fine-tuned version of on the None dataset. It achieves the following results on the evaluation set:
- Loss: 1.9157
- Accuracy: 0.5497
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.1599 | 0.32 | 3000 | 2.3060 | 0.4711 |
| 2.0452 | 0.65 | 6000 | 2.1564 | 0.5013 |
| 1.9981 | 0.97 | 9000 | 2.0995 | 0.5142 |
| 1.9806 | 1.3 | 12000 | 2.0596 | 0.5168 |
| 1.9459 | 1.62 | 15000 | 2.0307 | 0.5235 |
| 1.9205 | 1.95 | 18000 | 2.0189 | 0.5279 |
| 1.9039 | 2.27 | 21000 | 2.0024 | 0.5313 |
| 1.9033 | 2.6 | 24000 | 1.9890 | 0.5337 |
| 1.8621 | 2.92 | 27000 | 1.9509 | 0.5401 |
| 1.8252 | 3.25 | 30000 | 1.9420 | 0.5439 |
| 1.813 | 3.57 | 33000 | 1.9208 | 0.5493 |
| 1.8085 | 3.9 | 36000 | 1.9157 | 0.5497 |
| 1.7984 | 4.22 | 39000 | 1.9157 | 0.5497 |
| 1.8008 | 4.55 | 42000 | 1.9157 | 0.5497 |
| 1.7967 | 4.87 | 45000 | 1.9157 | 0.5497 |
| 1.7972 | 5.2 | 48000 | 1.9157 | 0.5497 |
| 1.7967 | 5.52 | 51000 | 1.9157 | 0.5497 |
Framework versions
- Transformers 4.31.0.dev0
- Pytorch 2.1.0+cu121
- Datasets 2.13.1
- Tokenizers 0.13.3
- Downloads last month
- 15