Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
generated_with_hf_jobs
trl
sft
conversational
text-generation-inference
Instructions to use sergiopaniego/trainer_output with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sergiopaniego/trainer_output with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sergiopaniego/trainer_output") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sergiopaniego/trainer_output") model = AutoModelForCausalLM.from_pretrained("sergiopaniego/trainer_output") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use sergiopaniego/trainer_output with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sergiopaniego/trainer_output" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sergiopaniego/trainer_output", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sergiopaniego/trainer_output
- SGLang
How to use sergiopaniego/trainer_output 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 "sergiopaniego/trainer_output" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sergiopaniego/trainer_output", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "sergiopaniego/trainer_output" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sergiopaniego/trainer_output", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sergiopaniego/trainer_output with Docker Model Runner:
docker model run hf.co/sergiopaniego/trainer_output
Training in progress, step 60
Browse files- README.md +3 -3
- model.safetensors +1 -1
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen2-0.5B
|
| 3 |
-
datasets: trl-lib/Capybara
|
| 4 |
library_name: transformers
|
| 5 |
model_name: trainer_output
|
| 6 |
tags:
|
| 7 |
- generated_from_trainer
|
| 8 |
-
- sft
|
| 9 |
- trl
|
|
|
|
|
|
|
| 10 |
licence: license
|
| 11 |
---
|
| 12 |
|
| 13 |
# Model Card for trainer_output
|
| 14 |
|
| 15 |
-
This model is a fine-tuned version of [Qwen/Qwen2-0.5B](https://huggingface.co/Qwen/Qwen2-0.5B)
|
| 16 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 17 |
|
| 18 |
## Quick start
|
|
|
|
| 1 |
---
|
| 2 |
base_model: Qwen/Qwen2-0.5B
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
model_name: trainer_output
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
|
|
|
| 7 |
- trl
|
| 8 |
+
- sft
|
| 9 |
+
- generated_with_hf_jobs
|
| 10 |
licence: license
|
| 11 |
---
|
| 12 |
|
| 13 |
# Model Card for trainer_output
|
| 14 |
|
| 15 |
+
This model is a fine-tuned version of [Qwen/Qwen2-0.5B](https://huggingface.co/Qwen/Qwen2-0.5B).
|
| 16 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 17 |
|
| 18 |
## Quick start
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1976163472
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1ab46832fe5eeda679e373a9120c7c78a15e70d62e8f352b67d757a97a269d7
|
| 3 |
size 1976163472
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6161
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a4758b5efeb2f1c62dc7546f5d5d8943e73979b216c0e73a4a2e4168c4da7c4
|
| 3 |
size 6161
|