---
title: llama2-70b-qnt4bit
canonical_url: "https://www.modelscope.cn/models/mlx-community/llama2-70b-qnt4bit"
md_url: "https://www.modelscope.cn/models/mlx-community/llama2-70b-qnt4bit.md"
repository: mlx-community/llama2-70b-qnt4bit
last_updated: 2024-12-19
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - llama
architectures:
  - LlamaForCausalLM
parameters: 11.0B
tensor_type:
  - U32
  - F16
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - en
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 999
stars: 0
tags:
  - facebook
  - meta
  - pytorch
  - llama
  - llama-2
  - mlx
---

# llama2-70b-qnt4bit

> llama2-70b-qnt4bit - mlx-community 在 ModelScope 开源的模型。mlx-community/llama2-70b-qnt4bit This model was converted to MLX format from meta-llama/Llama-2-70b-chat-hf. Refer to the original model card for more details on the model. Use with mlx

mlx-community/llama2-70b-qnt4bit 是 ModelScope 魔搭社区上的 11.0B 参数text-generation模型，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: mlx-community/llama2-70b-qnt4bit
- **Tasks**: text-generation
- **Parameters**: 11.0B
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Tags**: facebook, meta, pytorch, llama, llama-2, mlx
- **Downloads**: 999
- **Stars**: 0
- **Last updated**: 2024-12-19

Source: https://www.modelscope.cn/models/mlx-community/llama2-70b-qnt4bit

---

# mlx-community/llama2-70b-qnt4bit
This model was converted to MLX format from [`meta-llama/Llama-2-70b-chat-hf`]().
Refer to the [original model card](https://huggingface.co/meta-llama/Llama-2-70b-chat-hf) for more details on the model.
## Use with mlx

```bash
pip install mlx-lm
```

```python
from mlx_lm import load, generate

model, tokenizer = load("mlx-community/llama2-70b-qnt4bit")
response = generate(model, tokenizer, prompt="hello", verbose=True)
```
