JustinLin610 commited on
Commit
a437c5a
·
verified ·
1 Parent(s): aa2b6a4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -5,7 +5,7 @@ license_link: https://huggingface.co/Qwen/Qwen3-14B/blob/main/LICENSE
5
  pipeline_tag: text-generation
6
  ---
7
 
8
- # Qwen3-4B
9
  <a href="https://chat.qwen.ai/" target="_blank" style="margin: 2px;">
10
  <img alt="Chat" src="https://img.shields.io/badge/%F0%9F%92%9C%EF%B8%8F%20Qwen%20Chat%20-536af5" style="display: inline-block; vertical-align: middle;"/>
11
  </a>
@@ -49,7 +49,7 @@ The following contains a code snippet illustrating how to use the model generate
49
  from mlx_lm import load, generate
50
 
51
  model, tokenizer = load("Qwen/Qwen3-4B-MLX-4bit")
52
- prompt = "hello, Introduce yourself, and what can you do ?"
53
 
54
  if tokenizer.chat_template is not None:
55
  messages = [{"role": "user", "content": prompt}]
@@ -155,14 +155,14 @@ if __name__ == "__main__":
155
  chatbot = QwenChatbot()
156
 
157
  # First input (without /think or /no_think tags, thinking mode is enabled by default)
158
- user_input_1 = "How many r's in strawberries?"
159
  print(f"User: {user_input_1}")
160
  response_1 = chatbot.generate_response(user_input_1)
161
  print(f"Bot: {response_1}")
162
  print("----------------------")
163
 
164
  # Second input with /no_think
165
- user_input_2 = "Then, how many r's in blueberries? /no_think"
166
  print(f"User: {user_input_2}")
167
  response_2 = chatbot.generate_response(user_input_2)
168
  print(f"Bot: {response_2}")
 
5
  pipeline_tag: text-generation
6
  ---
7
 
8
+ # Qwen3-4B-MLX-4bit
9
  <a href="https://chat.qwen.ai/" target="_blank" style="margin: 2px;">
10
  <img alt="Chat" src="https://img.shields.io/badge/%F0%9F%92%9C%EF%B8%8F%20Qwen%20Chat%20-536af5" style="display: inline-block; vertical-align: middle;"/>
11
  </a>
 
49
  from mlx_lm import load, generate
50
 
51
  model, tokenizer = load("Qwen/Qwen3-4B-MLX-4bit")
52
+ prompt = "hello, Introduce yourself, and what can you do?"
53
 
54
  if tokenizer.chat_template is not None:
55
  messages = [{"role": "user", "content": prompt}]
 
155
  chatbot = QwenChatbot()
156
 
157
  # First input (without /think or /no_think tags, thinking mode is enabled by default)
158
+ user_input_1 = "How many 'r's are in strawberries?"
159
  print(f"User: {user_input_1}")
160
  response_1 = chatbot.generate_response(user_input_1)
161
  print(f"Bot: {response_1}")
162
  print("----------------------")
163
 
164
  # Second input with /no_think
165
+ user_input_2 = "Then, how many 'r's are in blueberries? /no_think"
166
  print(f"User: {user_input_2}")
167
  response_2 = chatbot.generate_response(user_input_2)
168
  print(f"Bot: {response_2}")