File size: 4,842 Bytes
abd6627
 
 
 
 
62deed9
abd6627
 
 
 
40f2701
abd6627
 
 
 
 
 
 
 
7fde3a2
abd6627
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40f2701
abd6627
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
---
base_model:
- Qwen/Qwen3-Coder-30B-A3B-Instruct
datasets:
- codeparrot/github-code-clean
pipeline_tag: text-generation
---

## Model Details

This model is a gguf q4km format of  [Qwen/Qwen3-Coder-30B-A3B-Instruct](https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct)  generated by [intel/auto-round](https://github.com/intel/auto-round) algorithm.  Embedding layer and lm-head layer are fallback to 8 bits and non expert layers are fallback to 4 bits. Please refer to Section `Generate the model` for more details.

Please follow the license of the original model.

## How To Use

Llamacpp inference

~~~bash
/llama-cli -hf Intel/Qwen3-Coder-30B-A3B-Instruct-gguf-q4km-AutoRound
~~~

~~~bash
> Write a quick sort algorithm.
Here's a quick sort algorithm implementation in Python:

```python
def quicksort(arr, low, high):
    """
    Quick sort implementation
    arr: array to be sorted
    low: starting index
    high: ending index
    """
    if low < high:
        # Partition the array and get pivot index
        pivot_index = partition(arr, low, high)

        # Recursively sort elements before and after partition
        quicksort(arr, low, pivot_index - 1)
        quicksort(arr, pivot_index + 1, high)

def partition(arr, low, high):
    """
    Partition function using last element as pivot
    """
    # Choose the rightmost element as pivot
    pivot = arr[high]

    # Index of smaller element (indicates right position of pivot)
    i = low - 1

    for j in range(low, high):
        # If current element is smaller than or equal to pivot
        if arr[j] <= pivot:
            i += 1
            arr[i], arr[j] = arr[j], arr[i]  # Swap elements

    # Place pivot in its correct position
    arr[i + 1], arr[high] = arr[high], arr[i + 1]
    return i + 1

# Wrapper function for easier use
def quick_sort(arr):
    if len(arr) <= 1:
        return arr
    quicksort(arr, 0, len(arr) - 1)
    return arr

# Example usage
if __name__ == "__main__":
    # Test the algorithm
    test_array = [64, 34, 25, 12, 22, 11, 90]
    print("Original array:", test_array)

    sorted_array = quick_sort(test_array.copy())
    print("Sorted array:", sorted_array)

    # Test with edge cases
    print("Empty array:", quick_sort([]))
    print("Single element:", quick_sort([42]))
    print("Already sorted:", quick_sort([1, 2, 3, 4, 5]))
    print("Reverse sorted:", quick_sort([5, 4, 3, 2, 1]))
```

**How it works:**

1. **Choose a pivot**: Select an element from the array (here we use the last element)
2. **Partition**: Rearrange the array so that:
   - Elements smaller than the pivot go to the left
   - Elements greater than the pivot go to the right
3. **Recursively sort**: Apply the same process to the sub-arrays on both sides of the pivot

**Time Complexity:**
- Best/Average case: O(n log n)
- Worst case: O(n²) - when pivot is always the smallest or largest element

**Space Complexity:** O(log n) - due to recursion stack

**Key Features:**
- In-place sorting (modifies original array)
- Not stable (doesn't preserve relative order of equal elements)
- Efficient for large datasets
- Good average performance

The algorithm handles edge cases like empty arrays, single elements, and already sorted arrays.

~~~



### Generate the model

Here is the sample command to reproduce the model

```bash
auto_round --format gguf:q4_k_m --iters 0 --nsamples 512 --dataset github-code-clean --model Qwen/Qwen3-Coder-30B-A3B-Instruct/ --output_dir tmp_autoround
```



## Ethical Considerations and Limitations

The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs.

Therefore, before deploying any applications of the model, developers should perform safety testing.

## Caveats and Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.

Here are a couple of useful links to learn more about Intel's AI software:

- Intel Neural Compressor [link](https://github.com/intel/neural-compressor)

## Disclaimer

The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.

## Cite

@article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi}, journal={arXiv preprint arXiv:2309.05516}, year={2023} }

[arxiv](https://arxiv.org/abs/2309.05516) [github](https://github.com/intel/auto-round)