Instructions to use worknick/opt-125m-tldr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use worknick/opt-125m-tldr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="worknick/opt-125m-tldr")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("worknick/opt-125m-tldr") model = AutoModelForCausalLM.from_pretrained("worknick/opt-125m-tldr") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use worknick/opt-125m-tldr with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "worknick/opt-125m-tldr" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "worknick/opt-125m-tldr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/worknick/opt-125m-tldr
- SGLang
How to use worknick/opt-125m-tldr 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 "worknick/opt-125m-tldr" \ --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": "worknick/opt-125m-tldr", "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 "worknick/opt-125m-tldr" \ --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": "worknick/opt-125m-tldr", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use worknick/opt-125m-tldr with Docker Model Runner:
docker model run hf.co/worknick/opt-125m-tldr
opt-125m-tldr
This model is a fine-tuned version of facebook/opt-125m on the None dataset. It achieves the following results on the evaluation set:
- Loss: 2.6296
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: 1e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 1
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 2.7992 | 0.07 | 1000 | 2.7158 |
| 2.7437 | 0.14 | 2000 | 2.6938 |
| 2.732 | 0.21 | 3000 | 2.6797 |
| 2.7157 | 0.27 | 4000 | 2.6691 |
| 2.7071 | 0.34 | 5000 | 2.6620 |
| 2.6998 | 0.41 | 6000 | 2.6557 |
| 2.696 | 0.48 | 7000 | 2.6495 |
| 2.6902 | 0.55 | 8000 | 2.6451 |
| 2.6791 | 0.62 | 9000 | 2.6408 |
| 2.6823 | 0.69 | 10000 | 2.6379 |
| 2.6806 | 0.75 | 11000 | 2.6345 |
| 2.6746 | 0.82 | 12000 | 2.6330 |
| 2.6765 | 0.89 | 13000 | 2.6306 |
| 2.6738 | 0.96 | 14000 | 2.6296 |
Framework versions
- Transformers 4.27.4
- Pytorch 2.0.0+cu117
- Datasets 2.11.0
- Tokenizers 0.13.2
- Downloads last month
- 6