This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !pip install --upgrade onnx==1.17.0 onnxruntime==1.20.1 onnxslim==0.1.48 optimum==1.24.0 transformers==4.48.3 | |
import torch | |
import torch.nn as nn | |
from transformers import AutoProcessor, AutoModelForCausalLM | |
import os | |
import onnxslim | |
from optimum.onnx.graph_transformations import merge_decoders, check_and_save_model | |
model = AutoModelForCausalLM.from_pretrained( |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.