File size: 1,481 Bytes
c5713b7
 
 
 
 
 
e74ca6a
 
 
c5713b7
 
 
e74ca6a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c5713b7
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
base_model:
- mistralai/Mistral-7B-v0.1
tags:
- mlx
---
# Mistral7B-v0.1-4bit-mlx-LoRA-WikiSQL

A 4-bit LoRA-fine-tuned Mistral-7B model for WikiSQL tasks, via Apple’s MLX framework and the `lora.py`. 

This model was converted to MLX format from [`Hinova/mistral-7B-v0.1-4bit-mlx`]().
Refer to the [original model card](https://huggingface.co/Hinova/mistral-7B-v0.1-4bit-mlx) for more details on the model.

---

## 🚀 Overview

This model was trained using the MLX Examples LoRA tutorial:

- Fine-tuning based on `lora.py` (ml-explore/mlx-examples/lora)  
- Adapted Mistral-7B on the WikiSQL dataset  
- Applied low-rank ΔW adapters with LoRA, freezing base weights  
- Quantized to 4-bit for Apple Silicon efficiency  
- Packaged in MLX format for seamless inference via `mlx-lm`

---

## 📦 Model Files

| File              | Description                                        |
|-------------------|----------------------------------------------------|
| `weights.npz`     | Fused weights: base + LoRA adapters               |
| `config.json`     | Model config with quantization metadata            |
| `tokenizer.model` | SentencePiece tokenizer for Mistral-7B            |

---

## 💡 How to Use

### Install

```bash
pip install mlx-lm

## 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 Hinova/mistral7b-v0.1-4bit-mlx-lora-wikisql --prompt "My name is"
```