Downloads · 30 days
5
17% of all-time downloads
cfu/Qwen-1.5B-onnx
Qwen-1.5B-onnx is a machine learning model from cfu. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Downloads · 30 days
5
17% of all-time downloads
All-time downloads
29
Public
Repo size
7.1 GB
Likes
0
Public
Click a slice to open those files.
Other6.2 GB · 87%
From the Hugging Face model README
import onnxruntime as ort
import numpy as np
from transformers import AutoTokenizer
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("CohenQu/DeepSeek-R1-Distill-Qwen-7B-GRPO")
# Load the ONNX model
onnx_model_path = "model.onnx" # Path to your ONNX model
session = ort.InferenceSession(onnx_model_path)
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
inputs = tokenizer(question, return_tensors="np", padding=True)
output = session.run(
None, # Output names can be None to get all outputs
{'input_ids': inputs['input_ids'],'attention_mask': inputs['attention_mask']}
)[0]
generated_text = tokenizer.decode(np.argmax(output, axis=-1)[0], skip_special_tokens=True)
print("Generated Text:", generated_text)