Instructions to use Unbabel/M-Prometheus-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Unbabel/M-Prometheus-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Unbabel/M-Prometheus-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Unbabel/M-Prometheus-3B") model = AutoModelForCausalLM.from_pretrained("Unbabel/M-Prometheus-3B") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Unbabel/M-Prometheus-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Unbabel/M-Prometheus-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Unbabel/M-Prometheus-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Unbabel/M-Prometheus-3B
- SGLang
How to use Unbabel/M-Prometheus-3B 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 "Unbabel/M-Prometheus-3B" \ --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": "Unbabel/M-Prometheus-3B", "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 "Unbabel/M-Prometheus-3B" \ --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": "Unbabel/M-Prometheus-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Unbabel/M-Prometheus-3B with Docker Model Runner:
docker model run hf.co/Unbabel/M-Prometheus-3B
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,64 +2,19 @@
|
|
| 2 |
library_name: transformers
|
| 3 |
license: other
|
| 4 |
base_model: Qwen/Qwen2.5-3B-Instruct
|
| 5 |
-
tags:
|
| 6 |
-
- alignment-handbook
|
| 7 |
-
- generated_from_trainer
|
| 8 |
-
model-index:
|
| 9 |
-
- name: trained_prometheus
|
| 10 |
-
results: []
|
| 11 |
---
|
| 12 |
|
| 13 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 14 |
should probably proofread and complete it, then remove this comment. -->
|
| 15 |
|
| 16 |
-
#
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
-
##
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
More information needed
|
| 29 |
-
|
| 30 |
-
## Training and evaluation data
|
| 31 |
-
|
| 32 |
-
More information needed
|
| 33 |
-
|
| 34 |
-
## Training procedure
|
| 35 |
-
|
| 36 |
-
### Training hyperparameters
|
| 37 |
-
|
| 38 |
-
The following hyperparameters were used during training:
|
| 39 |
-
- learning_rate: 1e-06
|
| 40 |
-
- train_batch_size: 2
|
| 41 |
-
- eval_batch_size: 1
|
| 42 |
-
- seed: 42
|
| 43 |
-
- distributed_type: multi-GPU
|
| 44 |
-
- num_devices: 8
|
| 45 |
-
- gradient_accumulation_steps: 2
|
| 46 |
-
- total_train_batch_size: 32
|
| 47 |
-
- total_eval_batch_size: 8
|
| 48 |
-
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 49 |
-
- lr_scheduler_type: cosine
|
| 50 |
-
- lr_scheduler_warmup_ratio: 0.1
|
| 51 |
-
- num_epochs: 1.0
|
| 52 |
-
|
| 53 |
-
### Training results
|
| 54 |
-
|
| 55 |
-
| Training Loss | Epoch | Step | Validation Loss |
|
| 56 |
-
|:-------------:|:------:|:-----:|:---------------:|
|
| 57 |
-
| 1.9997 | 1.0000 | 14840 | nan |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
### Framework versions
|
| 61 |
-
|
| 62 |
-
- Transformers 4.46.0
|
| 63 |
-
- Pytorch 2.1.2+cu121
|
| 64 |
-
- Datasets 3.3.1
|
| 65 |
-
- Tokenizers 0.20.3
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
license: other
|
| 4 |
base_model: Qwen/Qwen2.5-3B-Instruct
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
---
|
| 6 |
|
| 7 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 8 |
should probably proofread and complete it, then remove this comment. -->
|
| 9 |
|
| 10 |
+
# M-Prometheus
|
| 11 |
|
| 12 |
+
M-Prometheus is a suite of open LLM judges that can natively evaluate multilingual outputs. They were trained on 480k instances of multilingual direct assessment and pairwise comparison data wiht long-form feedback.
|
| 13 |
+
They can be prompted in the same way as [Prometheus-2](https://huggingface.co/prometheus-eval/prometheus-7b-v2.0/tree/main).
|
| 14 |
+
Check out our [paper](wip) for more details.
|
| 15 |
|
| 16 |
+
## Citation
|
| 17 |
|
| 18 |
+
```bibtex
|
| 19 |
+
wip
|
| 20 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|