Text Generation
MLX
Safetensors
English
Chinese
qwen3_moe
coding
research
deep thinking
1M context
256k context
Qwen3
All use cases
creative
creative writing
fiction writing
plot generation
sub-plot generation
story generation
scene continue
storytelling
fiction story
science fiction
all genres
story
writing
vivid prosing
vivid writing
fiction
roleplaying
bfloat16
emergent
self-awareness
finetune
Merge
conversational
4-bit precision
Instructions to use nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx"
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 nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx
Run Hermes
hermes
- MLX LM
How to use nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nightmedia/Qwen3-42B-A3B-Architect18-Nmedia-20-2-mxfp4-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }'
Update default_chat_template.jinja
Browse files- default_chat_template.jinja +12 -0
default_chat_template.jinja
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
{% macro render_item_list(item_list, tag_name='required') %}
|
| 2 |
{%- if item_list is defined and item_list is iterable and item_list | length > 0 %}
|
| 3 |
{%- if tag_name %}{{- '\n<' ~ tag_name ~ '>' -}}{% endif %}
|
|
|
|
| 1 |
+
{% macro render_extra_keys(json_dict, handled_keys) %}
|
| 2 |
+
{%- if json_dict is mapping %}
|
| 3 |
+
{%- for json_key in json_dict if json_key not in handled_keys %}
|
| 4 |
+
{%- if json_dict[json_key] is mapping or (json_dict[json_key] is sequence and json_dict[json_key] is not string) %}
|
| 5 |
+
{{- '\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | tojson | safe) ~ '</' ~ json_key ~ '>' }}
|
| 6 |
+
{%- else %}
|
| 7 |
+
{{-'\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | string) ~ '</' ~ json_key ~ '>' }}
|
| 8 |
+
{%- endif %}
|
| 9 |
+
{%- endfor %}
|
| 10 |
+
{%- endif %}
|
| 11 |
+
{% endmacro %}
|
| 12 |
+
|
| 13 |
{% macro render_item_list(item_list, tag_name='required') %}
|
| 14 |
{%- if item_list is defined and item_list is iterable and item_list | length > 0 %}
|
| 15 |
{%- if tag_name %}{{- '\n<' ~ tag_name ~ '>' -}}{% endif %}
|