---
title: AesCoder-4B-mlx-8Bit
canonical_url: "https://www.modelscope.cn/models/ncls-p/AesCoder-4B-mlx-8Bit"
md_url: "https://www.modelscope.cn/models/ncls-p/AesCoder-4B-mlx-8Bit.md"
repository: ncls-p/AesCoder-4B-mlx-8Bit
last_updated: 2025-11-18
license: apache-2.0
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - qwen3
architectures:
  - Qwen3ForCausalLM
base_model:
  - SamuelBang/AesCoder-4B
base_model_relation: quantized
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 58
stars: 0
tags:
  - mlx
---

# AesCoder-4B-mlx-8Bit

> AesCoder-4B-mlx-8Bit - ncls-p 在 ModelScope 开源的模型。ncls-p/AesCoder-4B-mlx-8Bit

ncls-p/AesCoder-4B-mlx-8Bit 是 ModelScope 魔搭社区上的text-generation模型，采用 apache-2.0 许可，基于 SamuelBang/AesCoder-4B 构建，可用 deploy_task text/emb、lmdeploy_turbomind 0.9.1、sglang 0.5.2 部署。

- **Repository**: ncls-p/AesCoder-4B-mlx-8Bit
- **License**: apache-2.0
- **Tasks**: text-generation
- **Base model**: SamuelBang/AesCoder-4B
- **Inference backends**: deploy_task text/emb, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Tags**: mlx
- **Downloads**: 58
- **Stars**: 0
- **Last updated**: 2025-11-18

Source: https://www.modelscope.cn/models/ncls-p/AesCoder-4B-mlx-8Bit

---

# ncls-p/AesCoder-4B-mlx-8Bit

The Model [ncls-p/AesCoder-4B-mlx-8Bit](https://huggingface.co/ncls-p/AesCoder-4B-mlx-8Bit) was converted to MLX format from [SamuelBang/AesCoder-4B](https://huggingface.co/SamuelBang/AesCoder-4B) using mlx-lm version **0.26.4**.

## Use with mlx

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

```python
from mlx_lm import load, generate

model, tokenizer = load("ncls-p/AesCoder-4B-mlx-8Bit")

prompt="hello"

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

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