---
title: phi-2-dpo-7k
canonical_url: "https://www.modelscope.cn/models/mlx-community/phi-2-dpo-7k"
md_url: "https://www.modelscope.cn/models/mlx-community/phi-2-dpo-7k.md"
repository: mlx-community/phi-2-dpo-7k
last_updated: 2024-12-20
license: mit
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - phi
architectures:
  - PhiForCausalLM
parameters: 2.8B
tensor_type:
  - F16
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - en
inference_backends:
  - "deploy_task text/emb"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 1000
stars: 0
tags:
  - nlp
  - code
  - mlx
---

# phi-2-dpo-7k

> phi-2-dpo-7k - mlx-community 在 ModelScope 开源的模型。phi-2-dpo-7k This is a finetuned version of microsoft/phi-2. Finetuned on a cocktail of 7k chat interaction from argilla latest DPO datase: orca pairs, ultrafeedback ratings, and capybara-dpo. Refer to the…

mlx-community/phi-2-dpo-7k 是 ModelScope 魔搭社区上的 2.8B 参数text-generation模型，采用 mit 许可，可用 deploy_task text/emb、sglang 0.5.2、vllm 0.9.2 部署。

- **Repository**: mlx-community/phi-2-dpo-7k
- **License**: mit
- **Tasks**: text-generation
- **Parameters**: 2.8B
- **Inference backends**: deploy_task text/emb, sglang 0.5.2, vllm 0.9.2
- **Tags**: nlp, code, mlx
- **Downloads**: 1000
- **Stars**: 0
- **Last updated**: 2024-12-20

Source: https://www.modelscope.cn/models/mlx-community/phi-2-dpo-7k

---

![Alt text](https://cdn.discordapp.com/attachments/989904887330521099/1203045175794868354/ChatGPT_Image.webp?ex=65cfaa21&is=65bd3521&hm=0861aae13f3b3960954b9f5938aa74bdee2afb3daee706064b47ee3fb75c6e8c&)
# phi-2-dpo-7k
This is a finetuned version of [`microsoft/phi-2`](). Finetuned on a cocktail of 7k chat interaction from argilla latest DPO datase: orca pairs, ultrafeedback ratings, and capybara-dpo.
Refer to the [original model card](https://huggingface.co/microsoft/phi-2) for more details on the model.


## Use with mlx
```bash
pip install mlx
```
```python
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/phi-2-dpo-7k")
response = generate(model, tokenizer, prompt="Similarity between pizza and quantum mechanics, in few words, use rhymes\nOutput: ", max_tokens=100, verbose=True)
```
