How to use Qwen3 for free?

How to use Qwen3 for free?

Qwen3 is the best open-sourced LLM

Photo by Domenico Loia on Unsplash

Just a few hours back, China’s Alibaba has released Qwen3, one of the state-of-the-art open-source models in six different variants. Yes, you heard it right, and not just that, the model is also open-source, so everyone can use it without paying anything.

https://medium.com/media/339217de3362ff62df68d8d21c19c25c/href

Data Science in Your Pocket – No Rocket Science

In this post, I will be explaining to you how you can use the model on different platforms.

Let’s get started

https://medium.com/media/7d45ba5464b696155af92aeca7bb544e/href

Qwen.chat

If you just wish to try out the model without deploying it in your local system or any of your GPUs, the best platform is to go to Qwen.chat, A chat platform like Chatgpt hosted by Alibaba Group. It not just provides you with Qwen3 but a lot of other features as well, image generation, video generation, so you can try it out.

It requires a login !

Qwen Chat

HuggingFace spaces

The models are hosted for free on Hugging Face Spaces as well. So, if you are not the one who wishes to run the models locally, an alternative for QwenChat is Hugging Face Spaces.

Qwen3 Demo – a Hugging Face Space by Qwen

HuggingFace (local usage)

Now, coming to the real moat. As the models are open-source, the way they’re presented on Hugging Face, you can directly go to Hugging Face and then run the models either locally or in Google Colab as well.

Qwen3 – a Qwen Collection

Below is a course on how to use the smallest Qwen3 0.6B model

#pip install -U transformers
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "Qwen/Qwen3-0.6B"

# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)

# prepare the model input
prompt = "Give me a short introduction to large language model."
messages = [
{"role": "user", "content": prompt}
]text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=True # Switches between thinking and non-thinking modes. Default is True.
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

# conduct text completion
generated_ids = model.generate(
**model_inputs,
max_new_tokens=32768
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()

# parsing thinking content
try:
# rindex finding 151668 (</think>)
index = len(output_ids) - output_ids[::-1].index(151668)
except ValueError:
index = 0

thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("n")
content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("n")

print("thinking content:", thinking_content)
print("content:", content)

Ollama

And everyone’s favourite the models, are also present on Ollama, hence you can just use Ollama software in your local system to chat with the model without taking care of any codes. All 6 variants are present, and you just need to run a single command to load them in your local system.

qwen3

https://medium.com/media/bc9880f1f348c80c3248033a2ad79f15/href

These are the ways in which you can use a new Qwen3 model by Alibaba. The model looks good, and it is worth trying out.


How to use Qwen3 for free? was originally published in Data Science in Your Pocket on Medium, where people are continuing the conversation by highlighting and responding to this story.

Share this article
0
Share
Shareable URL
Prev Post

Model Context Protocol (MCP Servers) Course for Beginners

Next Post

DeepSeek-Prover-V2: DeepSeek’s new model for Maths

Read next
Subscribe to our newsletter
Get notified of the best deals on our Courses, Tools and Giveaways..