MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound
185
6
—
by
Intel
Other
OTHER
172B params
New
185 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
385GB+ RAM
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Device Compatibility
Mobile
4-6GB RAM
Laptop
16GB RAM
Server
GPU
Minimum Recommended
161GB+ RAM
Code Examples
Example usage:python
def quick_sort(arr):
"""
Sorts a list using the Quick Sort algorithm.
Parameters:
arr (list): The list of elements to sort.
Returns:
list: The sorted list (in-place sort, so the original list is modified).
"""
# Base case: if the list has 0 or 1 elements, it's already sorted
if len(arr) <= 1:
return arr
# Recursive case
return _quick_sort_helper(arr, 0, len(arr) - 1)
def _quick_sort_helper(arr, low, high):
"""
Helper function for Quick Sort that sorts a subarray.
Parameters:
arr (list): The list containing the subarray.
low (int): Starting index of the subarray.
high (int): Ending index of the subarray.
"""
if low < high:
# Partition the array into two subarrays around the pivot
pivot_index = _partition(arr, low, high)
# Recursively sort the elements less than pivot
_quick_sort_helper(arr, low, pivot_index - 1)
# Recursively sort the elements greater than pivot
_quick_sort_helper(arr, pivot_index + 1, high)
def _partition(arr, low, high):
"""
Partitions the array around the pivot.
Elements less than pivot go to the left, greater to the right.
Parameters:
arr (list): The list to partition.
low (int): Starting index.
high (int): Ending index (pivot index).
Returns:
int: The index of the pivot after partitioning.
"""
# Choose the last element as pivot
pivot = arr[high]
# Index of the first element in the array
i = low
# Compare each element with the pivot
for j in range(low, high):
# If element is less than pivot, swap it to the left side
if arr[j] <= pivot:
arr[i], arr[j] = arr[j], arr[i]
i += 1
# Move pivot to its correct position
arr[i], arr[high] = arr[high], arr[i]
return i
# Example usage:
if __name__ == "__main__":
test_list = [10, 7, 8, 9, 1, 5, 3]
print("Original list:", test_list)
quick_sort(test_list)
print("Sorted list:", test_list)Example Output:text
Original list: [10, 7, 8, 9, 1, 5, 3]
Sorted list: [1, 3, 5, 7, 8, 9, 10]Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.