---
title: CodeLlama-7b-Python-hf-8bit-mlx
canonical_url: "https://www.modelscope.cn/models/mlx-community/CodeLlama-7b-Python-hf-8bit-mlx"
md_url: "https://www.modelscope.cn/models/mlx-community/CodeLlama-7b-Python-hf-8bit-mlx.md"
repository: mlx-community/CodeLlama-7b-Python-hf-8bit-mlx
last_updated: 2024-12-19
license: llama2
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - llama
architectures:
  - LlamaForCausalLM
parameters: 2.0B
tensor_type:
  - U32
  - BF16
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - code
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 995
stars: 0
tags:
  - llama-2
  - mlx
  - 8-bit
---

# CodeLlama-7b-Python-hf-8bit-mlx

> CodeLlama-7b-Python-hf-8bit-mlx - mlx-community 在 ModelScope 开源的模型。CodeLlama-7b-Python-hf-8bit-mlx

mlx-community/CodeLlama-7b-Python-hf-8bit-mlx 是 ModelScope 魔搭社区上的 2.0B 参数text-generation模型，采用 llama2 许可，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: mlx-community/CodeLlama-7b-Python-hf-8bit-mlx
- **License**: llama2
- **Tasks**: text-generation
- **Parameters**: 2.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**: llama-2, mlx, 8-bit
- **Downloads**: 995
- **Stars**: 0
- **Last updated**: 2024-12-19

Source: https://www.modelscope.cn/models/mlx-community/CodeLlama-7b-Python-hf-8bit-mlx

---

# CodeLlama-7b-Python-hf-8bit-mlx

This model was converted to MLX format from [`codellama/CodeLlama-7b-Python-hf`]().
Please, refer to the [original model card](https://huggingface.co/codellama/CodeLlama-7b-Python-hf) for more details on the original model.

## Use with mlx

```bash
pip install mlx
git clone https://github.com/ml-explore/mlx-examples.git

cd mlx-examples/llms/hf_llm
python generate.py --model mlx-community/CodeLlama-7b-Python-hf-8bit-mlx --prompt "My name is"
```
