Can I run these models on google collab ? Please Help!!

#5
by saikumar305 - opened

I want to run ne qen 3.5 models on google collab , but unable to find any document on it

Hello @saikumar305

Try copy-pasting following codeblock into Google Colab while making sure you have activated the T4 GPU:

!pip install transformers

# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="Qwen/Qwen3.5-0.8B")

msgs = []
while True:
    user: str = str(input(">_ Input: "))
    msgs.append({ "role": "user", "content": user })
    assistant = pipe(text=msgs)[0]["generated_text"][-1]["content"]
    msgs.append({"role": "assistant", "content": assistant})
    print(">>", assistant)

Have a great day.

Sign up or log in to comment