Text Generation
Transformers
Safetensors
llama
trl
dpo
Generated from Trainer
text-generation-inference
Instructions to use tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot") model = AutoModelForMultimodalLM.from_pretrained("tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot
- SGLang
How to use tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot 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 "tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot" \ --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": "tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot", "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 "tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot" \ --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": "tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot with Docker Model Runner:
docker model run hf.co/tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot
How to use from
SGLangUse 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 "tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot" \
--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": "tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'Quick Links
400STEPS_5e7rate_03beta_DPO_Meditron7B
This model is a fine-tuned version of epfl-llm/meditron-7b on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.6439
- Rewards/chosen: -0.0166
- Rewards/rejected: -0.1472
- Rewards/accuracies: 0.5714
- Rewards/margins: 0.1306
- Logps/rejected: -28.2845
- Logps/chosen: -26.5367
- Logits/rejected: -0.6342
- Logits/chosen: -0.6341
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: 5e-07
- train_batch_size: 4
- eval_batch_size: 1
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 8
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 100
- training_steps: 400
Training results
| Training Loss | Epoch | Step | Validation Loss | Rewards/chosen | Rewards/rejected | Rewards/accuracies | Rewards/margins | Logps/rejected | Logps/chosen | Logits/rejected | Logits/chosen |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.6896 | 0.1 | 50 | 0.6916 | 0.0067 | 0.0033 | 0.4637 | 0.0034 | -27.7828 | -26.4590 | -0.6113 | -0.6111 |
| 0.6783 | 0.2 | 100 | 0.6771 | -0.0693 | -0.1071 | 0.5319 | 0.0378 | -28.1508 | -26.7125 | -0.6173 | -0.6171 |
| 0.6697 | 0.29 | 150 | 0.6571 | -0.0107 | -0.1001 | 0.5626 | 0.0893 | -28.1273 | -26.5172 | -0.6171 | -0.6170 |
| 0.6463 | 0.39 | 200 | 0.6496 | 0.0037 | -0.1067 | 0.5692 | 0.1104 | -28.1493 | -26.4691 | -0.6288 | -0.6286 |
| 0.6124 | 0.49 | 250 | 0.6449 | -0.0073 | -0.1329 | 0.5648 | 0.1257 | -28.2368 | -26.5056 | -0.6318 | -0.6317 |
| 0.641 | 0.59 | 300 | 0.6440 | -0.0156 | -0.1460 | 0.5758 | 0.1304 | -28.2803 | -26.5333 | -0.6340 | -0.6339 |
| 0.643 | 0.68 | 350 | 0.6430 | -0.0150 | -0.1479 | 0.5780 | 0.1328 | -28.2866 | -26.5315 | -0.6343 | -0.6341 |
| 0.6632 | 0.78 | 400 | 0.6439 | -0.0166 | -0.1472 | 0.5714 | 0.1306 | -28.2845 | -26.5367 | -0.6342 | -0.6341 |
Framework versions
- Transformers 4.37.2
- Pytorch 2.0.0+cu117
- Datasets 2.17.0
- Tokenizers 0.15.1
- Downloads last month
- 8
Install from pip and serve model
# Install SGLang from pip: pip install sglang# Start the SGLang server: python3 -m sglang.launch_server \ --model-path "tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot" \ --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": "tsavage68/400STEPS_5e7rate_03beta_DPO_Meditron7B_zeroshot", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'