ONNX 模型库
返回模型

说明文档

示例测试

import onnxruntime as ort
import numpy as np
from transformers import AutoTokenizer

# 加载分词器
tokenizer = AutoTokenizer.from_pretrained("CohenQu/DeepSeek-R1-Distill-Qwen-7B-GRPO")

# 加载 ONNX 模型
onnx_model_path = "model.onnx"  # ONNX 模型路径
session = ort.InferenceSession(onnx_model_path)
question = "如果你有一台时光机,但只能去往过去或未来一次且无法返回,你会选择哪个,为什么?"
inputs = tokenizer(question, return_tensors="np", padding=True)
output = session.run(
    None,  # 输出名称可以为 None 以获取所有输出
    {'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)

cfu/Qwen-1.5B-onnx

作者 cfu

↓ 1 ♥ 0

创建时间: 2025-03-31 15:32:22+00:00

更新时间: 2025-03-31 17:20:01+00:00

在 Hugging Face 上查看

文件 (290)

.gitattributes
README.md
config.json
model.embed_tokens.weight
model.layers.0.input_layernorm.weight
model.layers.0.post_attention_layernorm.weight
model.layers.0.self_attn.q_proj.bias
model.layers.1.input_layernorm.weight
model.layers.1.post_attention_layernorm.weight
model.layers.1.self_attn.q_proj.bias
model.layers.10.input_layernorm.weight
model.layers.10.post_attention_layernorm.weight
model.layers.10.self_attn.q_proj.bias
model.layers.11.input_layernorm.weight
model.layers.11.post_attention_layernorm.weight
model.layers.11.self_attn.q_proj.bias
model.layers.12.input_layernorm.weight
model.layers.12.post_attention_layernorm.weight
model.layers.12.self_attn.q_proj.bias
model.layers.13.input_layernorm.weight
model.layers.13.post_attention_layernorm.weight
model.layers.13.self_attn.q_proj.bias
model.layers.14.input_layernorm.weight
model.layers.14.post_attention_layernorm.weight
model.layers.14.self_attn.q_proj.bias
model.layers.15.input_layernorm.weight
model.layers.15.post_attention_layernorm.weight
model.layers.15.self_attn.q_proj.bias
model.layers.16.input_layernorm.weight
model.layers.16.post_attention_layernorm.weight
model.layers.16.self_attn.q_proj.bias
model.layers.17.input_layernorm.weight
model.layers.17.post_attention_layernorm.weight
model.layers.17.self_attn.q_proj.bias
model.layers.18.input_layernorm.weight
model.layers.18.post_attention_layernorm.weight
model.layers.18.self_attn.q_proj.bias
model.layers.19.input_layernorm.weight
model.layers.19.post_attention_layernorm.weight
model.layers.19.self_attn.q_proj.bias
model.layers.2.input_layernorm.weight
model.layers.2.post_attention_layernorm.weight
model.layers.2.self_attn.q_proj.bias
model.layers.20.input_layernorm.weight
model.layers.20.post_attention_layernorm.weight
model.layers.20.self_attn.q_proj.bias
model.layers.21.input_layernorm.weight
model.layers.21.post_attention_layernorm.weight
model.layers.21.self_attn.q_proj.bias
model.layers.22.input_layernorm.weight
model.layers.22.post_attention_layernorm.weight
model.layers.22.self_attn.q_proj.bias
model.layers.23.input_layernorm.weight
model.layers.23.post_attention_layernorm.weight
model.layers.23.self_attn.q_proj.bias
model.layers.24.input_layernorm.weight
model.layers.24.post_attention_layernorm.weight
model.layers.24.self_attn.q_proj.bias
model.layers.25.input_layernorm.weight
model.layers.25.post_attention_layernorm.weight
model.layers.25.self_attn.q_proj.bias
model.layers.26.input_layernorm.weight
model.layers.26.post_attention_layernorm.weight
model.layers.26.self_attn.q_proj.bias
model.layers.27.input_layernorm.weight
model.layers.27.post_attention_layernorm.weight
model.layers.27.self_attn.q_proj.bias
model.layers.3.input_layernorm.weight
model.layers.3.post_attention_layernorm.weight
model.layers.3.self_attn.q_proj.bias
model.layers.4.input_layernorm.weight
model.layers.4.post_attention_layernorm.weight
model.layers.4.self_attn.q_proj.bias
model.layers.5.input_layernorm.weight
model.layers.5.post_attention_layernorm.weight
model.layers.5.self_attn.q_proj.bias
model.layers.6.input_layernorm.weight
model.layers.6.post_attention_layernorm.weight
model.layers.6.self_attn.q_proj.bias
model.layers.7.input_layernorm.weight
model.layers.7.post_attention_layernorm.weight
model.layers.7.self_attn.q_proj.bias
model.layers.8.input_layernorm.weight
model.layers.8.post_attention_layernorm.weight
model.layers.8.self_attn.q_proj.bias
model.layers.9.input_layernorm.weight
model.layers.9.post_attention_layernorm.weight
model.layers.9.self_attn.q_proj.bias
model.norm.weight
model.onnx ONNX
onnx__MatMul_8143
onnx__MatMul_8150
onnx__MatMul_8151
onnx__MatMul_8174
onnx__MatMul_8175
onnx__MatMul_8176
onnx__MatMul_8177
onnx__MatMul_8178
onnx__MatMul_8185
onnx__MatMul_8186
onnx__MatMul_8209
onnx__MatMul_8210
onnx__MatMul_8211
onnx__MatMul_8212
onnx__MatMul_8213
onnx__MatMul_8220
onnx__MatMul_8221
onnx__MatMul_8244
onnx__MatMul_8245
onnx__MatMul_8246
onnx__MatMul_8247
onnx__MatMul_8248
onnx__MatMul_8255
onnx__MatMul_8256
onnx__MatMul_8279
onnx__MatMul_8280
onnx__MatMul_8281
onnx__MatMul_8282
onnx__MatMul_8283
onnx__MatMul_8290
onnx__MatMul_8291
onnx__MatMul_8314
onnx__MatMul_8315
onnx__MatMul_8316
onnx__MatMul_8317
onnx__MatMul_8318
onnx__MatMul_8325
onnx__MatMul_8326
onnx__MatMul_8349
onnx__MatMul_8350
onnx__MatMul_8351
onnx__MatMul_8352
onnx__MatMul_8353
onnx__MatMul_8360
onnx__MatMul_8361
onnx__MatMul_8384
onnx__MatMul_8385
onnx__MatMul_8386
onnx__MatMul_8387
onnx__MatMul_8388
onnx__MatMul_8395
onnx__MatMul_8396
onnx__MatMul_8419
onnx__MatMul_8420
onnx__MatMul_8421
onnx__MatMul_8422
onnx__MatMul_8423
onnx__MatMul_8430
onnx__MatMul_8431
onnx__MatMul_8454
onnx__MatMul_8455
onnx__MatMul_8456
onnx__MatMul_8457
onnx__MatMul_8458
onnx__MatMul_8465
onnx__MatMul_8466
onnx__MatMul_8489
onnx__MatMul_8490
onnx__MatMul_8491
onnx__MatMul_8492
onnx__MatMul_8493
onnx__MatMul_8500
onnx__MatMul_8501
onnx__MatMul_8524
onnx__MatMul_8525
onnx__MatMul_8526
onnx__MatMul_8527
onnx__MatMul_8528
onnx__MatMul_8535
onnx__MatMul_8536
onnx__MatMul_8559
onnx__MatMul_8560
onnx__MatMul_8561
onnx__MatMul_8562
onnx__MatMul_8563
onnx__MatMul_8570
onnx__MatMul_8571
onnx__MatMul_8594
onnx__MatMul_8595
onnx__MatMul_8596
onnx__MatMul_8597
onnx__MatMul_8598
onnx__MatMul_8605
onnx__MatMul_8606
onnx__MatMul_8629
onnx__MatMul_8630
onnx__MatMul_8631
onnx__MatMul_8632
onnx__MatMul_8633
onnx__MatMul_8640
onnx__MatMul_8641
onnx__MatMul_8664
onnx__MatMul_8665
onnx__MatMul_8666
onnx__MatMul_8667
onnx__MatMul_8668
onnx__MatMul_8675
onnx__MatMul_8676
onnx__MatMul_8699
onnx__MatMul_8700
onnx__MatMul_8701
onnx__MatMul_8702
onnx__MatMul_8703
onnx__MatMul_8710
onnx__MatMul_8711
onnx__MatMul_8734
onnx__MatMul_8735
onnx__MatMul_8736
onnx__MatMul_8737
onnx__MatMul_8738
onnx__MatMul_8745
onnx__MatMul_8746
onnx__MatMul_8769
onnx__MatMul_8770
onnx__MatMul_8771
onnx__MatMul_8772
onnx__MatMul_8773
onnx__MatMul_8780
onnx__MatMul_8781
onnx__MatMul_8804
onnx__MatMul_8805
onnx__MatMul_8806
onnx__MatMul_8807
onnx__MatMul_8808
onnx__MatMul_8815
onnx__MatMul_8816
onnx__MatMul_8839
onnx__MatMul_8840
onnx__MatMul_8841
onnx__MatMul_8842
onnx__MatMul_8843
onnx__MatMul_8850
onnx__MatMul_8851
onnx__MatMul_8874
onnx__MatMul_8875
onnx__MatMul_8876
onnx__MatMul_8877
onnx__MatMul_8878
onnx__MatMul_8885
onnx__MatMul_8886
onnx__MatMul_8909
onnx__MatMul_8910
onnx__MatMul_8911
onnx__MatMul_8912
onnx__MatMul_8913
onnx__MatMul_8920
onnx__MatMul_8921
onnx__MatMul_8944
onnx__MatMul_8945
onnx__MatMul_8946
onnx__MatMul_8947
onnx__MatMul_8948
onnx__MatMul_8955
onnx__MatMul_8956
onnx__MatMul_8979
onnx__MatMul_8980
onnx__MatMul_8981
onnx__MatMul_8982
onnx__MatMul_8983
onnx__MatMul_8990
onnx__MatMul_8991
onnx__MatMul_9014
onnx__MatMul_9015
onnx__MatMul_9016
onnx__MatMul_9017
onnx__MatMul_9018
onnx__MatMul_9025
onnx__MatMul_9026
onnx__MatMul_9049
onnx__MatMul_9050
onnx__MatMul_9051
onnx__MatMul_9052
onnx__MatMul_9053
onnx__MatMul_9060
onnx__MatMul_9061
onnx__MatMul_9084
onnx__MatMul_9085
onnx__MatMul_9086
onnx__MatMul_9087
onnx__MatMul_9088
onnx__MatMul_9095
onnx__MatMul_9096
onnx__MatMul_9119
onnx__MatMul_9120
onnx__MatMul_9121
onnx__MatMul_9122
onnx__MatMul_9123
special_tokens_map.json
tokenizer.json
tokenizer_config.json