---
title: bigcode-starcoder2-15b-4bit
canonical_url: "https://www.modelscope.cn/models/mlx-community/bigcode-starcoder2-15b-4bit"
md_url: "https://www.modelscope.cn/models/mlx-community/bigcode-starcoder2-15b-4bit.md"
repository: mlx-community/bigcode-starcoder2-15b-4bit
last_updated: 2025-02-16
license: bigcode-openrail-m
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - starcoder2
architectures:
  - Starcoder2ForCausalLM
base_model:
  - bigcode/starcoder2-15b
base_model_relation: quantized
parameters: 2.5B
tensor_type:
  - F16
  - U32
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "vllm 0.9.2"
downloads: 654
stars: 0
tags:
  - code
  - mlx
---

# bigcode-starcoder2-15b-4bit

> bigcode-starcoder2-15b-4bit - mlx-community 在 ModelScope 开源的模型。mlx-community/bigcode-starcoder2-15b-4bit

mlx-community/bigcode-starcoder2-15b-4bit 是 ModelScope 魔搭社区上的 2.5B 参数text-generation模型，采用 bigcode-openrail-m 许可，基于 bigcode/starcoder2-15b 构建，可用 deploy_task text/emb、lmdeploy 0.9.1、vllm 0.9.2 部署。

- **Repository**: mlx-community/bigcode-starcoder2-15b-4bit
- **License**: bigcode-openrail-m
- **Tasks**: text-generation
- **Parameters**: 2.5B
- **Base model**: bigcode/starcoder2-15b
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, vllm 0.9.2
- **Tags**: code, mlx
- **Downloads**: 654
- **Stars**: 0
- **Last updated**: 2025-02-16

Source: https://www.modelscope.cn/models/mlx-community/bigcode-starcoder2-15b-4bit

---

# mlx-community/bigcode-starcoder2-15b-4bit

The Model [mlx-community/bigcode-starcoder2-15b-4bit](https://huggingface.co/mlx-community/bigcode-starcoder2-15b-4bit) was
converted to MLX format from [bigcode/starcoder2-15b](https://huggingface.co/bigcode/starcoder2-15b)
using mlx-lm version **0.21.1** by [Focused](https://focused.io).

[![Focused Logo](https://focused.io/images/header-logo.svg "Focused Logo")](https://focused.io)

## Use with mlx

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

```python
from mlx_lm import load, generate

model, tokenizer = load("mlx-community/bigcode-starcoder2-15b-4bit")

prompt = "hello"

if tokenizer.chat_template is not None:
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, add_generation_prompt=True
    )

response = generate(model, tokenizer, prompt=prompt, verbose=True)
```

---

Focused is a technology company at the forefront of AI-driven development, empowering organizations to unlock the full potential of artificial intelligence. From integrating innovative models into existing systems to building scalable, modern AI infrastructures, we specialize in delivering tailored, incremental solutions that meet you where you are.
Curious how we can help with your AI next project?
[Get in Touch](https://focused.io/capabilities/ai-readiness-implementation)

[![Focused Logo](https://focused.io/images/header-logo.svg "Focused Logo")](https://focused.io)
