Instructions to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF 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 prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16 # Run inference directly in the terminal: llama cli -hf prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16 # Run inference directly in the terminal: llama cli -hf prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16 # Run inference directly in the terminal: ./build/bin/llama cli -hf prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
Use Docker
docker model run hf.co/prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
- Llama new
- LM Studio
- Jan
- vLLM
How to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
- SGLang
How to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF with Ollama:
ollama run hf.co/prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
- Unsloth Desktop
- Pi
How to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF with Docker Model Runner:
docker model run hf.co/prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
- Lemonade
How to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
Run and chat with the model
lemonade run user.Qwen3.8-Flash-Next-MXFP4-MoE-GGUF-BF16
List all available models
lemonade list
- Hermes Agent
How to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
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:9931/v1 hermes config set model.default prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16
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:9931/v1 \ --custom-model-id "prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF:BF16" \ --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"
Qwen3.8-Flash-Next-MXFP4-MoE-GGUF
Qwen3.8-Flash-Next is an open-weight multimodal Mixture-of-Experts (MoE) model and experimental architectural preview for Qwen4, combining 125B core parameters (6B activated per token across 10 routed and 1 shared expert out of 512) with 51B offload-friendly n-gram embedding parameters and a 4B multi-token prediction (MTP) head alongside a vision encoder. Across its 48 layers, it introduces a hybrid attention layout interleaving Gated DeltaNet with block-level Qwen Sparse Attention (QSA) to cut long-context latency, multi-branch Gated Residual streams for training stability, and a native 262,144-token context window extensible to 1M tokens via YaRN. Supporting text, image, and hour-scale video inputs with configurable
<think>reasoning (enable_thinking,preserve_thinking, andreasoning_effort), it outperforms larger and proprietary peers across agentic coding, computer use, and multimodal benchmarksβincluding DeepSWE 1.1 (58.7), SWE-bench Pro (62.5), SWE-bench Multilingual (81.0), AndroidWorld (84.5), GPQA Diamond (91.7), LiveCodeBench v6 (91.9), and MathVision (95.7 with code interpreter)βand is released under the Qwen Community 1.0 license for deployment viaTransformers,vLLM,SGLang, andTokenSpeed.
MTP β Speculative Decoding: Yes
Multi-Token Prediction (MTP) is a speculative decoding technique that accelerates local inference by predicting multiple future tokens in a single forward pass. Unlike traditional speculative decoding, it does not require a separate, smaller "draft" model; the MTP prediction heads act as the drafter. In this repository, the MTP weights are shipped as a separate GGUF file Qwen3.8-Flash-Next-MTP.BF16.gguf rather than embedded in the main model file. Load it alongside the main model GGUF to enable speculative decoding. The main model runs standalone without it.
Model Files
| File Name | Quant Type | File Size | File Link | Description |
|---|---|---|---|---|
| Qwen3.8-Flash-Next-MTP.BF16.gguf | BF16 (MTP) | 7.77 GB | Link | Standalone Multi-Token Prediction (MTP) file in BF16. Loaded alongside the main model to enable speculative decoding. Not a standalone model. |
| Qwen3.8-Flash-Next.MXFP4_MOE.gguf | MXFP4_MOE | 124 GB | Link | MXFP4_MOE: Highly optimized for NVIDIA Blackwell hardware accelerators (e.g., RTX Pro 6000, RTX 50-series, B200, B300), offering native hardware-accelerated FP4 Tensor Core speeds. Main model file; pair with the MTP file for speculative decoding. |
| Qwen3.8-Flash-Next.mmproj-bf16.gguf | mmproj-bf16 | 908 MB | Link | Multimodal projection file in BF16 format. Used for vision/image capabilities. |
Run Inference (llama.cpp)
/path/to/llama.cpp/build/bin/llama-cli \
-m /path/to/models/Qwen3.8-Flash-Next.MXFP4_MOE.gguf \
-md /path/to/models/Qwen3.8-Flash-Next-MTP.BF16.gguf \
--spec-type draft-mtp \
--spec-draft-n-max 2 \
-ngl auto \
-c 16384 \
--cache-type-k q8_0 \
--seed 42 \
-n 16384 \
-st \
-p "Given a special linked list with n nodes where each node has two pointers a next pointer that points to the next node of the singly linked list, and a random pointer that points to the random node of the linked list."
Output (llama.cpp)
Expand the dropdown to view the full output.
Given a special linked list with n nodes where each node has two pointers a next pointer that points to the next node of the singly linked list, and a random pointer that points to the random node of the linked list.
[Start thinking]
We need answer user. User: "Given a special linked list with n nodes where each node has two pointers a next pointer that points to the next node of the singly linked list, and a random pointer that points to the random node of the linked list." This sounds like prompt maybe wants clone? Need infer likely classic problem: copy linked list with random pointers. They might be asking algorithm? But not explicit question. Need respond perhaps explain problem and ask? Could provide solution: deep copy with O(1) space using interleaving or O(n) with hashmap. Need maybe mention constraints? Let's craft answer: if goal is to clone such list, provide approaches. Since user only statement, maybe expects completion? The phrase might be from interview question: "Given a special linked list... write a program to copy the linked list such that next and random pointers point to copies." Need provide detailed answer. We'll include problem: clone linked list with random pointers. Provide O(n) time, O(n) hash map and O(n) time O(1) extra space interleaving. Maybe also if just asking to detect/construct random pointers? Need answer general.
Need ensure final. Use analysis now. We'll formulate. Also maybe mention if random pointer can point to node outside? Usually within list. Need algorithm steps, code maybe Python/C++/Java? Could include one language or pseudocode. Since no language, use generic. Need be thorough. Maybe include definitions, example, edge cases.
Need final with headings. Let's produce. [End thinking]
You are describing the classic Copy a Linked List with Random Pointers problem.
Each node has:
node.next β next node in the linked list
node.random β random node in the linked list
The usual task is:
Given the head of a linked list where every node has
nextandrandompointers, return a deep copy of the list.
The copied list should contain new nodes, and thenextandrandompointers in the new list should point to copied nodes, not the original nodes.
Example
Original list:
1 β 2 β 3 β 4 β null
Random pointers:
1.random β 3
2.random β 1
3.random β 4
4.random β 2
Copied list:
1' β 2' β 3' β 4' β null
1'.random β 3'
2'.random β 1'
3'.random β 4'
4'.random β 2'
All nodes are new, and no pointer from the copy should point to an original node.
Approach 1: Using a Hash Map
Idea
- Create a new copy of every node.
- Store a mapping:
original node β copied node
- Connect the copied list using:
- copied nodeβs
nextpointer- copied nodeβs
randompointer
- copied nodeβs
Algorithm
If head is null:
return null
map = empty hash map
// Step 1: Create all nodes and store original β copy mapping
current = head
while current != null:
copyNode = new Node(current.val)
map[current] = copyNode
current = current.next
// Step 2: Set next and random pointers of copied nodes
current = head
while current != null:
copyNode = map[current]
if current.next != null:
copyNode.next = map[current.next]
if current.random != null:
copyNode.random = map[current.random]
current = current.next
return map[head]
Complexity
Time Complexity: O(n)
Space Complexity: O(n)
Because the hash map stores one entry per node.
Approach 2: Using Interleaved Nodes β O(1) Extra Space
This is the optimal interview solution.
Idea
Instead of using a hash map, temporarily weave each copied node directly after its original node.
If the original list is:
1 β 2 β 3
Create:
1 β 1' β 2 β 2' β 3 β 3'
Now each original node current has its copy as current.next.
This allows us to resolve random pointers easily:
original random pointer points to current.random
so copied random pointer should point to current.random.next
Finally, separate the original list and copied list.
Step-by-Step Process
Step 1: Insert copy nodes after each original node
Original:
1 β 2 β 3 β null
After insertion:
1 β 1' β 2 β 2' β 3 β 3' β null
Step 2: Assign random pointers to copied nodes
For every original node current:
If current.random != null:
current.next.random = current.random.next
Why?
current.next β copy of current
current.random β random original node
current.random.next β copy of that random original node
Step 3: Separate original and copied lists
1 β 1' β 2 β 2' β 3 β 3' β null
becomes:
Original:
1 β 2 β 3 β null
Copy:
1' β 2' β 3' β null
Algorithm
If head is null:
return null
// Step 1: Create copy nodes and insert them after original nodes
current = head
while current != null:
copyNode = new Node(current.val)
copyNode.next = current.next
current.next = copyNode
current = copyNode.next
// Step 2: Set random pointers of copied nodes
current = head
while current != null:
copyNode = current.next
if current.random != null:
copyNode.random = current.random.next
current = copyNode.next
// Step 3: Restore original list and extract copied list
current = head
newHead = head.next
while current != null:
copyNode = current.next
current.next = copyNode.next
if copyNode.next != null:
copyNode.next = copyNode.next.next
current = current.next
return newHead
Complexity
Time Complexity: O(n)
Space Complexity: O(1)
The copied nodes are counted as part of the output, not auxiliary space.
Important Edge Cases
1. Empty list
head = null
Return:
null
2. Single node
1 β null
1.random β 1
Return:
1' β null
1'.random β 1'
3. Random pointer is null
1 β 2 β 3
1.random = null
Then the copied node should also have:
1'.random = null
4. Random pointer points backward
1 β 2 β 3
2.random β 1
This is valid and must be handled correctly.
5. Random pointer points to itself
1 β 2 β 3
2.random β 2
The copied nodeβs random pointer must point to its own copy, not the original node.
Python Implementation
Definition
class Node:
def __init__(self, val):
self.val = val
self.next = None
self.random = None
O(n) Space Solution Using Hash Map
def copyRandomList(head):
if not head:
return None
old_to_new = {}
# Create all new nodes
current = head
while current:
old_to_new[current] = Node(current.val)
current = current.next
# Assign next and random pointers
current = head
while current:
copy = old_to_new[current]
if current.next:
copy.next = old_to_new[current.next]
if current.random:
copy.random = old_to_new[current.random]
current = current.next
return old_to_new[head]
O(1) Extra Space Solution Using Interleaving
def copyRandomList(head):
if not head:
return None
# Step 1: Create copy nodes and insert them after original nodes
current = head
while current:
copy = Node(current.val)
copy.next = current.next
current.next = copy
current = copy.next
# Step 2: Assign random pointers to copied nodes
current = head
while current:
copy = current.next
if current.random:
copy.random = current.random.next
current = copy.next
# Step 3: Separate original and copied lists
newHead = head.next
current = head
while current:
copy = current.next
current.next = copy.next
if copy.next:
copy.next = copy.next.next
current = current.next
return newHead
Java Implementation
Definition
class Node {
int val;
Node next;
Node random;
Node(int val) {
this.val = val;
}
}
O(1) Extra Space Solution
public class Solution {
public Node copyRandomList(Node head) {
if (head == null) {
return null;
}
// Step 1: Create copy nodes after original nodes
Node current = head;
while (current != null) {
Node copy = new Node(current.val);
copy.next = current.next;
current.next = copy;
current = copy.next;
}
// Step 2: Assign random pointers to copied nodes
current = head;
while (current != null) {
Node copy = current.next;
if (current.random != null) {
copy.random = current.random.next;
}
current = copy.next;
}
// Step 3: Separate original and copied lists
Node newHead = head.next;
current = head;
while (current != null) {
Node copy = current.next;
current.next = copy.next;
if (copy.next != null) {
copy.next = copy.next.next;
}
current = current.next;
}
return newHead;
}
}
C++ Implementation
Definition
class Node {
public:
int val;
Node* next;
Node* random;
Node(int value) {
val = value;
next = nullptr;
random = nullptr;
}
};
O(1) Extra Space Solution
class Solution {
public:
Node* copyRandomList(Node* head) {
if (head == nullptr) {
return nullptr;
}
// Step 1: Insert copy nodes after original nodes
Node* current = head;
while (current != nullptr) {
Node* copy = new Node(current->val);
copy->next = current->next;
current->next = copy;
current = copy->next;
}
// Step 2: Assign random pointers to copied nodes
current = head;
while (current != nullptr) {
Node* copy = current->next;
if (current->random != nullptr) {
copy->random = current->random->next;
}
current = copy->next;
}
// Step 3: Separate original and copied lists
Node* newHead = head->next;
current = head;
while (current != nullptr) {
Node* copy = current->next;
current->next = copy->next;
if (copy->next != nullptr) {
copy->next = copy->next->next;
}
current = current->next;
}
return newHead;
}
};
Key Intuition
The hard part is copying random pointers because they do not follow the normal order of the linked list.
The key observation is:
If current.next is the copy of current,
then current.random.next is the copy of current.random.
So by placing each copied node immediately after its original node, random pointer relationships become easy to resolve in one pass.
Final Answer
To deep copy a linked list with next and random pointers:
Best approach:
1. Insert copy nodes after original nodes.
2. Use current.random.next to assign copy.random.
3. Separate the two lists.
Time Complexity: O(n)
Space Complexity: O(1) auxiliary space
This produces a completely new linked list where all next and random pointers point to copied nodes.
[ Prompt: 107.0 t/s | Generation: 139.5 t/s ]
Exiting...
[Prompt: 107.0 t/s | Generation: 139.5 t/s] - Generated with full GPU offloading on 2x NVIDIA RTX PRO 6000 Blackwell Server Edition using MTP (draft-n-max: 2). GGUF:
Qwen3.8-Flash-Next.MXFP4_MOE.gguf| Draft MTP:Qwen3.8-Flash-Next-MTP.BF16.gguf
llama.cpp
LLM inference in C/C++ β https://github.com/ggml-org/llama.cpp
Quantized using llama.cpp by prithivMLmods.
- Downloads last month
- 190
4-bit
16-bit
Model tree for prithivMLmods/Qwen3.8-Flash-Next-MXFP4-MoE-GGUF
Base model
Qwen/Qwen3.8-Flash-Next