Instructions to use Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S # Run inference directly in the terminal: llama cli -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S # Run inference directly in the terminal: llama cli -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S # Run inference directly in the terminal: ./llama-cli -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S # Run inference directly in the terminal: ./build/bin/llama-cli -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
Use Docker
docker model run hf.co/Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
- LM Studio
- Jan
- Ollama
How to use Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound with Ollama:
ollama run hf.co/Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
- Unsloth Studio
How to use Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound to start chatting
- Pi
How to use Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound with Docker Model Runner:
docker model run hf.co/Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
- Lemonade
How to use Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
Run and chat with the model
lemonade run user.MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound-Q2_K_S
List all available models
lemonade list
- Hermes Agent
How to use Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound:Q2_K_S" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Model Details
This model is a mixed gguf q2ks format of cerebras/MiniMax-M2-REAP-172B-A10B generated by 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.
./llama-cli --jinja -hf Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound
> Write a quick sort algorithm.
We are going to implement the Quick Sort algorithm.
Quick Sort is a divide and conquer algorithm that works by selecting a 'pivot' element from the array and partitioning the array into two sub-arrays: elements less than the pivot and elements greater than the pivot. Then recursively sort the sub-arrays.
Steps:
1. Choose a pivot (common strategies: first element, last element, middle, random, etc.)
2. Partition the array such that all elements less than the pivot are to the left of the pivot and all greater to the right.
3. Recursively quick sort the left and right sub-arrays until the entire array is sorted.
We'll write a function `quick_sort(arr)` that sorts the array in place.
We'll use the last element as the pivot for simplicity.
Partitioning:
- We traverse the array from the left to the right (except the pivot) and if an element is less than the pivot, we swap it to the left side.
- We maintain an index (say `i`) for the position where the next element (if found) should be placed in the left part.
- Then we put the pivot at the correct position.
Example:
Array: [10, 7, 8, 9, 1, 5]
Pivot: 5 (last element)
We want: [1, 5, 7, 8, 9, 10]
Implementation of partition (with last element as pivot):
- Initialize `i` as the starting index (0).
- For each element from the start to the second last (because last is pivot):
if element < pivot:
swap arr[i] and arr[j]
i = i + 1
- Finally, swap arr[i] and the pivot (which is at the last index).
- Then return i (the pivot index).
Then we call quick_sort on the left part (from 0 to i-1) and the right part (from i+1 to end).
Let's code accordingly.
</think>
Here's a Python implementation of the Quick Sort algorithm with comments:
```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)
```
### How It Works:
1. **Partitioning**:
- The pivot is the last element of the array.
- Elements less than the pivot move to its left, greater to its right.
- The pivot ends up in its correct final position.
2. **Recursive Sorting**:
- The array is divided around the pivot into two subarrays.
- The process repeats on each subarray until the base case (0 or 1 element) is reached.
### Key Points:
- **In-Place Sorting**: Modifies the original list without needing extra space.
- **Efficiency**:
- **Average Time Complexity**: O(n log n)
- **Worst Case**: O(nΒ²) (when pivot is chosen poorly, e.g., last element in a sorted array)
- **Space Complexity**: O(log n) for recursion stack (in the average case).
### Example Output:
```
Original list: [10, 7, 8, 9, 1, 5, 3]
Sorted list: [1, 3, 5, 7, 8, 9, 10]
```
### To Avoid Worst Case (O(nΒ²)):
- Use a random pivot: `pivot = arr[random.randint(low, high)]`
- Or use the median-of-three method for pivot selection.
Generate the model
If you encounter a bug when loading the model, please remove the @check_model_inputs decorator in modeling_minimax_m2.py.
auto_round --model cerebras/MiniMax-M2-REAP-172B-A10B --scheme gguf:q2_k_mixed --output_dir tmp_autoround --iters 0
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
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} }
- Downloads last month
- 16
2-bit
Model tree for Intel/MiniMax-M2-REAP-172B-A10B-gguf-q2ks-mixed-AutoRound
Base model
MiniMaxAI/MiniMax-M2