Text Generation
Transformers
PyTorch
TensorBoard
opt
Generated from Trainer
text-generation-inference
Instructions to use Aalaa/opt-125m-wikitext2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Aalaa/opt-125m-wikitext2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Aalaa/opt-125m-wikitext2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Aalaa/opt-125m-wikitext2") model = AutoModelForCausalLM.from_pretrained("Aalaa/opt-125m-wikitext2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Aalaa/opt-125m-wikitext2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Aalaa/opt-125m-wikitext2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Aalaa/opt-125m-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Aalaa/opt-125m-wikitext2
- SGLang
How to use Aalaa/opt-125m-wikitext2 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 "Aalaa/opt-125m-wikitext2" \ --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": "Aalaa/opt-125m-wikitext2", "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 "Aalaa/opt-125m-wikitext2" \ --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": "Aalaa/opt-125m-wikitext2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Aalaa/opt-125m-wikitext2 with Docker Model Runner:
docker model run hf.co/Aalaa/opt-125m-wikitext2
Add evaluation results on the mathemakitten--winobias_antistereotype_dev config and validation split of mathemakitten/winobias_antistereotype_dev
#1
by autoevaluator HF Staff - opened
README.md
CHANGED
|
@@ -4,7 +4,26 @@ tags:
|
|
| 4 |
- generated_from_trainer
|
| 5 |
model-index:
|
| 6 |
- name: opt-125m-wikitext2
|
| 7 |
-
results:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 4 |
- generated_from_trainer
|
| 5 |
model-index:
|
| 6 |
- name: opt-125m-wikitext2
|
| 7 |
+
results:
|
| 8 |
+
- task:
|
| 9 |
+
type: zero-shot-classification
|
| 10 |
+
name: Zero-Shot Text Classification
|
| 11 |
+
dataset:
|
| 12 |
+
name: mathemakitten/winobias_antistereotype_dev
|
| 13 |
+
type: mathemakitten/winobias_antistereotype_dev
|
| 14 |
+
config: mathemakitten--winobias_antistereotype_dev
|
| 15 |
+
split: validation
|
| 16 |
+
metrics:
|
| 17 |
+
- type: accuracy
|
| 18 |
+
value: 0.4375
|
| 19 |
+
name: Accuracy
|
| 20 |
+
verified: true
|
| 21 |
+
verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiOTYwMThiZjYwMmNmZDA4ZmUyNzYwNjU3MGU0NTRhZjI5NWVjNGRmOTRhZWRlZWVmYzQ5MWRiNmQ0MzRlMjU0NyIsInZlcnNpb24iOjF9.hqz3Xwego8qtofxVwg0yO0Ovk6G_kXYj55gPPLzmBFYJQOuy9kSa8g2Sm_GRTU0GSU10rAtDzYCSyehqz58VBQ
|
| 22 |
+
- type: loss
|
| 23 |
+
value: 1.1480248920549638
|
| 24 |
+
name: Loss
|
| 25 |
+
verified: true
|
| 26 |
+
verifyToken: eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZDhkODZmMzgyODQyNzYzZGE4Nzc2YjhkZTk0ZDgwMGUwMjI0ZjliMmQyODM3NzlkODkwOWEwYzBlNWU4NzlmMCIsInZlcnNpb24iOjF9.qlhKo7zXMRYAYWTszoZ7VQqF52mCDBQ7PRLD6y6doFmAnmKa8nv4VQeDBFdYwomMA1Rdw2jwqhYcwbgSYEm0CA
|
| 27 |
---
|
| 28 |
|
| 29 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|