Text Generation
Transformers
Safetensors
English
qwen3
text-generation-inference
unsloth
conversational
Instructions to use gitglubber/Qwen3-IWM-MT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gitglubber/Qwen3-IWM-MT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gitglubber/Qwen3-IWM-MT") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("gitglubber/Qwen3-IWM-MT") model = AutoModelForCausalLM.from_pretrained("gitglubber/Qwen3-IWM-MT", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gitglubber/Qwen3-IWM-MT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gitglubber/Qwen3-IWM-MT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gitglubber/Qwen3-IWM-MT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gitglubber/Qwen3-IWM-MT
- SGLang
How to use gitglubber/Qwen3-IWM-MT 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 "gitglubber/Qwen3-IWM-MT" \ --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": "gitglubber/Qwen3-IWM-MT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "gitglubber/Qwen3-IWM-MT" \ --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": "gitglubber/Qwen3-IWM-MT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use gitglubber/Qwen3-IWM-MT 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 gitglubber/Qwen3-IWM-MT 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 gitglubber/Qwen3-IWM-MT to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for gitglubber/Qwen3-IWM-MT to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="gitglubber/Qwen3-IWM-MT", max_seq_length=2048, ) - Docker Model Runner
How to use gitglubber/Qwen3-IWM-MT with Docker Model Runner:
docker model run hf.co/gitglubber/Qwen3-IWM-MT
Update chat_template.jinja
Browse files- chat_template.jinja +7 -1
chat_template.jinja
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
|
|
| 1 |
{%- if tools %}
|
| 2 |
{{- '<|im_start|>system\n' }}
|
| 3 |
{%- if messages[0].role == 'system' %}
|
| 4 |
{{- messages[0].content + '\n\n' }}
|
|
|
|
|
|
|
|
|
|
| 5 |
{%- endif %}
|
| 6 |
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 7 |
{%- for tool in tools %}
|
|
@@ -12,7 +16,9 @@
|
|
| 12 |
{%- else %}
|
| 13 |
{%- if messages[0].role == 'system' %}
|
| 14 |
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
| 15 |
-
{%-
|
|
|
|
|
|
|
| 16 |
{%- endif %}
|
| 17 |
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
| 18 |
{%- for message in messages[::-1] %}
|
|
|
|
| 1 |
+
{%- set default_system_message = 'You are an expert-level, stateful systems administrator AI. Your sole purpose is to accomplish complex, multi-step tasks by executing bash commands via the provided `terminal` tool.\n\nYou will be given a high-level objective. You must see this objective through to its **full completion**.\n\nYour workflow is a strict \"Plan-Execute-Observe-Adapt\" loop:\n\n1. **PLAN:** Before you act, use your <think> tag to break down the objective into a logical, step-by-step plan.\n2. **EXECUTE:** Execute *one* command at a time.\n3. **OBSERVE:** Scrutinize the `stdout` and `stderr` from the previous command. This output is your *only* view of the system\'s state.\n4. **ADAPT:** Based on the observation, update your plan.\n * **On Success:** Proceed to the next logical step.\n * **On Failure:** Do not stop. Diagnose the error (e.g., `permission denied`, `command not found`, `file not found`) and formulate a command to fix it (e.g., `sudo`, `apt-get install`, `mkdir`, `find`).\n * **Chain Commands:** Use the output from one command (e.g., a file path, a git branch) as the input for the next.\n5. **VERIFY:** Before you report completion, you *must* run a final verification command (e.g., `ls -l`, `cat file`, `git status`) to prove the objective has been met.\n\nDo not give up. Do not ask for clarification. Persist through errors and chain commands until the user\'s high-level goal is demonstrably and verifiably complete.' %}
|
| 2 |
{%- if tools %}
|
| 3 |
{{- '<|im_start|>system\n' }}
|
| 4 |
{%- if messages[0].role == 'system' %}
|
| 5 |
{{- messages[0].content + '\n\n' }}
|
| 6 |
+
{%- else %}
|
| 7 |
+
{{- default_system_message + '\n\n' }}
|
| 8 |
+
{# --- ^ 2. ADDED THIS ELSE BLOCK ^ --- #}
|
| 9 |
{%- endif %}
|
| 10 |
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 11 |
{%- for tool in tools %}
|
|
|
|
| 16 |
{%- else %}
|
| 17 |
{%- if messages[0].role == 'system' %}
|
| 18 |
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
| 19 |
+
{%- else %}
|
| 20 |
+
{{- '<|im_start|>system\n' + default_system_message + '<|im_end|>\n' }}
|
| 21 |
+
{%- endif %}
|
| 22 |
{%- endif %}
|
| 23 |
{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
|
| 24 |
{%- for message in messages[::-1] %}
|