Text Generation
Transformers
Safetensors
llama
alignment-handbook
trl
dpo
Generated from Trainer
text-generation-inference
Instructions to use Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3") model = AutoModelForMultimodalLM.from_pretrained("Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3
- SGLang
How to use Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3 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 "Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3" \ --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": "Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3", "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 "Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3" \ --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": "Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3 with Docker Model Runner:
docker model run hf.co/Minbyul/meditron-7b-dpo-full-wo-healthsearch_qa-ep3
End of training
Browse files- README.md +17 -1
- all_results.json +13 -0
- config.json +1 -1
- eval_results.json +16 -0
README.md
CHANGED
|
@@ -2,9 +2,15 @@
|
|
| 2 |
license: llama2
|
| 3 |
base_model: epfl-llm/meditron-7b
|
| 4 |
tags:
|
|
|
|
| 5 |
- trl
|
| 6 |
- dpo
|
| 7 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
model-index:
|
| 9 |
- name: meditron-7b-dpo-full-wo-healthsearch_qa-ep3
|
| 10 |
results: []
|
|
@@ -15,7 +21,17 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 15 |
|
| 16 |
# meditron-7b-dpo-full-wo-healthsearch_qa-ep3
|
| 17 |
|
| 18 |
-
This model is a fine-tuned version of [epfl-llm/meditron-7b](https://huggingface.co/epfl-llm/meditron-7b) on
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
## Model description
|
| 21 |
|
|
|
|
| 2 |
license: llama2
|
| 3 |
base_model: epfl-llm/meditron-7b
|
| 4 |
tags:
|
| 5 |
+
- alignment-handbook
|
| 6 |
- trl
|
| 7 |
- dpo
|
| 8 |
- generated_from_trainer
|
| 9 |
+
- trl
|
| 10 |
+
- dpo
|
| 11 |
+
- generated_from_trainer
|
| 12 |
+
datasets:
|
| 13 |
+
- HuggingFaceH4/ultrafeedback_binarized
|
| 14 |
model-index:
|
| 15 |
- name: meditron-7b-dpo-full-wo-healthsearch_qa-ep3
|
| 16 |
results: []
|
|
|
|
| 21 |
|
| 22 |
# meditron-7b-dpo-full-wo-healthsearch_qa-ep3
|
| 23 |
|
| 24 |
+
This model is a fine-tuned version of [epfl-llm/meditron-7b](https://huggingface.co/epfl-llm/meditron-7b) on the HuggingFaceH4/ultrafeedback_binarized dataset.
|
| 25 |
+
It achieves the following results on the evaluation set:
|
| 26 |
+
- Loss: 0.6786
|
| 27 |
+
- Rewards/chosen: -0.0040
|
| 28 |
+
- Rewards/rejected: -0.0362
|
| 29 |
+
- Rewards/accuracies: 0.6245
|
| 30 |
+
- Rewards/margins: 0.0322
|
| 31 |
+
- Logps/rejected: -1242.8666
|
| 32 |
+
- Logps/chosen: -1081.9209
|
| 33 |
+
- Logits/rejected: -0.7759
|
| 34 |
+
- Logits/chosen: -0.8007
|
| 35 |
|
| 36 |
## Model description
|
| 37 |
|
all_results.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"train_loss": 0.6656996970591338,
|
| 4 |
"train_runtime": 1292.3769,
|
| 5 |
"train_samples": 5883,
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
+
"eval_logits/chosen": -0.8007283806800842,
|
| 4 |
+
"eval_logits/rejected": -0.7758755683898926,
|
| 5 |
+
"eval_logps/chosen": -1081.9208984375,
|
| 6 |
+
"eval_logps/rejected": -1242.8665771484375,
|
| 7 |
+
"eval_loss": 0.6785902976989746,
|
| 8 |
+
"eval_rewards/accuracies": 0.6244725584983826,
|
| 9 |
+
"eval_rewards/chosen": -0.003962064627557993,
|
| 10 |
+
"eval_rewards/margins": 0.032243408262729645,
|
| 11 |
+
"eval_rewards/rejected": -0.0362054705619812,
|
| 12 |
+
"eval_runtime": 850.5886,
|
| 13 |
+
"eval_samples": 7584,
|
| 14 |
+
"eval_samples_per_second": 8.916,
|
| 15 |
+
"eval_steps_per_second": 0.279,
|
| 16 |
"train_loss": 0.6656996970591338,
|
| 17 |
"train_runtime": 1292.3769,
|
| 18 |
"train_samples": 5883,
|
config.json
CHANGED
|
@@ -23,6 +23,6 @@
|
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.39.0.dev0",
|
| 26 |
-
"use_cache":
|
| 27 |
"vocab_size": 32017
|
| 28 |
}
|
|
|
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.39.0.dev0",
|
| 26 |
+
"use_cache": true,
|
| 27 |
"vocab_size": 32017
|
| 28 |
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 1.0,
|
| 3 |
+
"eval_logits/chosen": -0.8007283806800842,
|
| 4 |
+
"eval_logits/rejected": -0.7758755683898926,
|
| 5 |
+
"eval_logps/chosen": -1081.9208984375,
|
| 6 |
+
"eval_logps/rejected": -1242.8665771484375,
|
| 7 |
+
"eval_loss": 0.6785902976989746,
|
| 8 |
+
"eval_rewards/accuracies": 0.6244725584983826,
|
| 9 |
+
"eval_rewards/chosen": -0.003962064627557993,
|
| 10 |
+
"eval_rewards/margins": 0.032243408262729645,
|
| 11 |
+
"eval_rewards/rejected": -0.0362054705619812,
|
| 12 |
+
"eval_runtime": 850.5886,
|
| 13 |
+
"eval_samples": 7584,
|
| 14 |
+
"eval_samples_per_second": 8.916,
|
| 15 |
+
"eval_steps_per_second": 0.279
|
| 16 |
+
}
|