Qwen3-Coder-30B-A3B-Instruct-gguf-q2ks-mixed-AutoRound

5.0K
27
30.0B
by
Intel
Code Model
OTHER
30B params
New
5K downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
68GB+ RAM
Mobile
Laptop
Server
Quick Summary

AI model with specialized capabilities.

Device Compatibility

Mobile
4-6GB RAM
Laptop
16GB RAM
Server
GPU
Minimum Recommended
28GB+ RAM

Code Examples

Alternative in-place version (more memory efficient)python
def quicksort(arr):
    """
    Sort an array using the quicksort algorithm.

    Args:
        arr: List to be sorted

    Returns:
        Sorted list
    """
    if len(arr) <= 1:
        return arr

    pivot = arr[len(arr) // 2]
    left = [x for x in arr if x < pivot]
    middle = [x for x in arr if x == pivot]
    right = [x for x in arr if x > pivot]

    return quicksort(left) + middle + quicksort(right)

# Alternative in-place version (more memory efficient)
def quicksort_inplace(arr, low=0, high=None):
    """
    Sort an array in-place using quicksort.

    Args:
        arr: List to be sorted
        low: Starting index
        high: Ending index
    """
    if high is None:
        high = len(arr) - 1

    if low < high:
        pivot_index = partition(arr, low, high)
        quicksort_inplace(arr, low, pivot_index - 1)
        quicksort_inplace(arr, pivot_index + 1, high)

def partition(arr, low, high):
    """
    Partition function for in-place quicksort.
    """
    pivot = arr[high]
    i = low - 1

    for j in range(low, high):
        if arr[j] <= pivot:
            i += 1
            arr[i], arr[j] = arr[j], arr[i]

    arr[i + 1], arr[high] = arr[high], arr[i + 1]
    return i + 1

# Example usage:
if __name__ == "__main__":
    # Test the simple version
    test_arr = [64, 34, 25, 12, 22, 11, 90]
    print("Original:", test_arr)
    print("Sorted:", quicksort(test_arr))

    # Test the in-place version
    test_arr2 = [64, 34, 25, 12, 22, 11, 90]
    quicksort_inplace(test_arr2)
    print("In-place sorted:", test_arr2)
Alternative in-place version (more memory efficient)python
def quicksort(arr):
    """
    Sort an array using the quicksort algorithm.

    Args:
        arr: List to be sorted

    Returns:
        Sorted list
    """
    if len(arr) <= 1:
        return arr

    pivot = arr[len(arr) // 2]
    left = [x for x in arr if x < pivot]
    middle = [x for x in arr if x == pivot]
    right = [x for x in arr if x > pivot]

    return quicksort(left) + middle + quicksort(right)

# Alternative in-place version (more memory efficient)
def quicksort_inplace(arr, low=0, high=None):
    """
    Sort an array in-place using quicksort.

    Args:
        arr: List to be sorted
        low: Starting index
        high: Ending index
    """
    if high is None:
        high = len(arr) - 1

    if low < high:
        pivot_index = partition(arr, low, high)
        quicksort_inplace(arr, low, pivot_index - 1)
        quicksort_inplace(arr, pivot_index + 1, high)

def partition(arr, low, high):
    """
    Partition function for in-place quicksort.
    """
    pivot = arr[high]
    i = low - 1

    for j in range(low, high):
        if arr[j] <= pivot:
            i += 1
            arr[i], arr[j] = arr[j], arr[i]

    arr[i + 1], arr[high] = arr[high], arr[i + 1]
    return i + 1

# Example usage:
if __name__ == "__main__":
    # Test the simple version
    test_arr = [64, 34, 25, 12, 22, 11, 90]
    print("Original:", test_arr)
    print("Sorted:", quicksort(test_arr))

    # Test the in-place version
    test_arr2 = [64, 34, 25, 12, 22, 11, 90]
    quicksort_inplace(test_arr2)
    print("In-place sorted:", test_arr2)

Deploy This Model

Production-ready deployment in minutes

Together.ai

Instant API access to this model

Fastest API

Production-ready inference API. Start free, scale to millions.

Try Free API

Replicate

One-click model deployment

Easiest Setup

Run models in the cloud with simple API. No DevOps required.

Deploy Now

Disclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.