青少年耳鸣是什么原因引起的| bppv是什么病| 原位杂交技术检查什么| 一般细菌涂片检查是查什么| 肺结节钙化是什么意思| 舀水是什么意思| 狮子座是什么时候| 为什么叫香港脚| 经常想吐恶心是什么原因| 宝宝干咳嗽是什么原因| 肺炎吃什么药好得快| 23岁属什么| 胸膜炎吃什么药好| 腮腺炎输液用什么药| 梦见抓蛇是什么预兆| 2037年是什么年| 白切鸡用什么鸡| 新生儿吐奶是什么原因| 什么原因得湿疹| 枸杞和山楂泡水喝有什么功效| 孕晚期高血压对胎儿有什么影响| 免去职务是什么意思| 指甲分层是什么原因| 青蒜炒什么好吃| 九出十三归是什么意思| 什么牌子的助听器最好| 什么叫修辞手法| 变态反应是什么意思| 仁慈是什么意思| 6月3号是什么星座| 公价是什么意思| 今天农历什么日子| 注解是什么意思| 肝脏的主要功能是什么| 蛤读什么| 阿玛尼属于什么档次| 不典型鳞状细胞是什么意思| 猫叫是什么原因| 水克什么| 菠萝蜜什么季节成熟| 为什么叫夺命大乌苏| scc是什么检查项目| 脚软没力气是什么原因引起的| 拉肚子是什么原因导致的| 什么就是什么造句| 什么是过敏体质| 腹泻可以吃什么水果| 乙肝有抗体是什么意思| bodywash是什么意思| 血热是什么原因引起的| 喉咙痒是什么原因| 新生儿缺氧会有什么后遗症| 大吉大利是什么生肖| 一百万存款算什么水平| 钙化影是什么意思| 补中益气丸治什么病| 晚饭吃什么减肥| 李连杰是什么国籍| 什么叫糙米| 喝完酒吃什么解酒最快| 普外科是什么科| 项羽为什么叫西楚霸王| 手麻看什么科| 皮尔卡丹属于什么档次| std是什么意思| 黄芪什么味道| 用纸盒能做什么手工| 睾丸疼什么原因| 眼睛发黑是什么原因引起的| 婴儿什么时候长牙| 赵云的坐骑是什么马| 市检察长是什么级别| 肌酐清除率是什么意思| 胆结石吃什么| 发烧吃什么药| 抓龙筋什么意思| 萎缩性胃炎吃什么药效果好| 倦怠期是什么意思| 什么是象形字| 酷盖是什么意思| 乙肝表面抗原大于250是什么意思| 双肺上叶肺大泡是什么意思| 肝脓肿是什么原因引起的| 蚰蜒吃什么| 腰底部疼痛跟什么病有关| 嘴唇发紫是什么原因| 高材生是什么意思| 怀孕上火吃什么能降火| 什么叫牙周炎| 紫色代表什么| 头发染什么颜色显皮肤白显年轻| 梦见偷桃子是什么意思| 女生安全期是什么意思| prep是什么药| 双非是什么| 吃什么东西补血快| 痛风喝什么茶最好| 藏红花是什么| asuka是什么意思| 什么叫柞蚕丝| 有什么好吃的外卖| paris什么牌子| 金钱骨是什么部位| 血儿茶酚胺是查什么的| 扶她是什么意思| 内窥镜是做什么检查| 黄体中期是什么意思| 九华山在什么地方| 科颜氏属于什么档次| 额头发黑是什么原因| 免疫组化检查是什么| 女生胸部长什么样| 12月25日什么星座| 大林木是什么数字| 恶寒发热是什么意思| 办港澳通行证需要带什么| 强迫症有什么症状| hpv挂什么科| 阑尾炎输液输什么药| 金银花不能和什么一起吃| 肝火旺是什么原因引起的| 夏花是什么意思| 蓝莓树长什么样| 头孢呋辛钠主治什么病| cdf是什么意思| 山竹不能和什么一起吃| 梦见猫吃老鼠什么意思| 灌肠用什么| 什么叫小三阳| 为什么我| 周杰伦英文名叫什么| 头汗特别多是什么原因| 老佛爷是什么牌子| 刺瘊子是什么原因造成的| 奥美拉唑有什么副作用| 反流性食管炎吃什么中成药最好| mario是什么意思| 心律不齐是什么原因| 老年人口干是什么原因| 什么花秋天开| 下边瘙痒是什么原因| 腹膜炎吃什么药| 精液是什么味| 枸杞加什么泡水喝壮阳| 乳腺挂什么科| 勰读什么| no.是什么意思| 肝红素高是什么原因| 九霄云外是什么生肖| 什么叫业力| 芥末油是什么提炼出来的| 小孩放屁很臭是什么原因| 低血压吃什么好的最快| 嗓子干痒吃什么药| 三碘甲状腺原氨酸高是什么意思| 精子碎片率高吃什么药| 减肥有什么好方法| 血糖高不能吃什么水果| 湿气重的人适合吃什么| 黄瓜与什么食物相克| 1971年属猪的是什么命| 为什么手术服是绿色的| 影子代表什么生肖| 梦见海龟是什么意思| 什么的秋天| 冰释前嫌的释是什么意思| 跳蚤为什么只咬一个人| 什么叫遗精| 阴到炎用什么药好得快| 龋读什么| 低密度脂蛋白胆固醇偏低是什么意思| 八仙过海开过什么生肖| 肝癌是什么症状| 马夫是什么意思| 经常口臭的人是什么原因引起的| 去医院看痘痘挂什么科| 果丹皮是用什么做的| 7月16号是什么星座| 苯佐卡因是什么药| 月经期间适合吃什么食物| 怀疑心衰做什么检查| 一箭双雕是什么生肖| 99什么意思| 憨笑是什么意思| 下半年有什么节日| k粉是什么| 乔木是什么意思| 转氨酶高对身体有什么影响| 数不胜数的胜是什么意思| 黄瓜有什么功效| 殊胜是什么意思| 拜谒是什么意思| 多云是什么意思| bl小说是什么意思| 移动硬盘什么牌子好| 业力是什么| 香港脚是什么症状图片| 259是什么意思| 手上起小水泡是什么原因| 万能受血者是什么血型| 广东省省长是什么级别| 鼻子经常流鼻涕是什么原因| 为什么啊| 白色糠疹是什么原因引起的| 爱说梦话是什么原因| 机械性窒息死亡是什么意思| 当兵苦到什么程度| 什么醒酒| 什么时候称体重最准确| 盆腔炎吃什么消炎药| 50岁今年属什么生肖| 炖羊肉放什么| 相公是什么意思| 芃字五行属什么| 排骨炖什么汤止咳润肺| 大便不成形吃什么中成药| 什么是胶原蛋白| 王维是什么派诗人| 河南是什么气候| 皮肤长斑是什么原因引起的| 水垢是什么| 在所不辞是什么意思| 乳头痛什么问题| 尿道口长肉芽是什么| 尿黄起泡是什么原因| skp是什么品牌| 勃不起来吃什么药| 联合创始人是什么意思| kcl是什么药| 进德勤一般要什么学历| 草字头加西念什么| 肺与大肠相表里是什么意思| 有点想吐是什么原因| 风寒感冒咳嗽吃什么药| 宫颈糜烂有什么症状和现象| 胆囊结石会引起身体什么症状| 吃什么降肌酐| gpd是什么意思| 皇帝的新装是什么意思| 雷龙吃什么| 血凝是什么意思| 灵魂摆渡是什么意思| 心率低40多吃什么药| 口苦口臭口干吃什么药| 劫财是什么意思| 交织是什么意思| 何其是什么意思| 打扮的意思是什么| 什么是正骨| 聚乙二醇400是什么| 电气石是什么东西| h202阳性是什么意思| 肝功能异常是什么| 几乎的意思是什么| 什么地问填词语| 手爱出汗是什么原因| 月经期间适合吃什么食物| 绿色加什么颜色是蓝色| 什么是脑中风| 运单号是什么| 便士是什么意思| 破伤风是什么症状| 为什么脚会有酸臭味| 龙井属于什么茶| 百度

Try to extend agent mode in VS Code!

台“汉光军演”开始实弹演练 模拟防御解放军“闪电进攻”

百度   中国科学院院士歼-20战斗机总设计师杨伟:歼-20本身是我们空军空中致胜作战的一个最重拳头的一个产品。

The AI Toolkit supports the Open Neural Network Exchange (ONNX) format for running models locally. ONNX is an open standard for representing machine learning models, defining a common set of operators and a file format that enables models to run across various hardware platforms.

To use models from other catalogs, such as Azure AI Foundry or Hugging Face, in the AI Toolkit, you must first convert them to ONNX format.

This tutorial guides you through converting Hugging Face models to ONNX format and loading them into the AI Toolkit.

Set up the environment

To convert models from Hugging Face or Azure AI Foundry, you need the Model Builder tool.

Follow these steps to set up your environment:

  1. Ensure you have either Anaconda or Miniconda installed on your device.

  2. Create a dedicated conda environment for Model Builder and install the necessary dependencies (onnx, torch, onnxruntime_genai, and transformers):

    conda create -n model_builder python==3.11 -y
    conda activate model_builder
    pip install onnx torch onnxruntime_genai==0.6.0 transformers
    

    Note: For certain newer models, such as Phi-4-mini, you may need to install the latest development version of transformers directly from GitHub:

    pip install git+http://github.com/huggingface/transformers
    

Access Hugging Face models

There are multiple ways to access Hugging Face models. In this tutorial, we use the huggingface_hub CLI as an example to demonstrate managing a model repository.

Note: Ensure your Python environment is properly set up before proceeding.

To download models from Hugging Face:

  1. Install the CLI:

    pip install -U "huggingface_hub[cli]"
    
  2. Download the model repository.

  3. All files in the downloaded repository will be used during conversion.

Create the directory structure

The AI Toolkit loads ONNX models from its working directory:

  • Windows: %USERPROFILE%\.aitk\models
  • Unix-like systems (macOS): $HOME/.aitk/models

To ensure your models load correctly, create the required four-layer directory structure within the AI Toolkit's working directory. For example:

mkdir C:\Users\Administrator\.aitk\models\microsoft\Phi-3.5-vision-instruct-onnx\cpu\phi3.5-cpu-int4-rtn-block-32

In this example, the four-layer directory structure is microsoft\Phi-3.5-vision-instruct-onnx\cpu\phi3.5-cpu-int4-rtn-block-32.

Important

The naming of the four-layer directory structure is important. Each directory layer corresponds with a specific system parameter: $publisherName\$modelName\$runtime\$displayName. The $displayName appears in the local model tree view at the top-left side of the extension. Use distinct displayName values for different models to avoid confusion.

Convert models to ONNX format

Run the following command to convert your model to ONNX format:

python -m onnxruntime_genai.models.builder -m $modelPath -p $precision -e $executionProvider -o $outputModelPath -c $cachePath --extra_options include_prompt_templates=1
Tip

Common precision and execution provider combinations include: FP32 CPU, FP32 CUDA, FP16 CUDA, FP16 DML, INT4 CPU, INT4 CUDA, and INT4 DML.

Here is a complete example command for converting a model to ONNX format:

python -m onnxruntime_genai.models.builder -m C:\hfmodel\phi3 -p fp16 -e cpu -o C:\Users\Administrator\.aitk\models\microsoft\Phi-3-mini-4k-instruct\cpu\phi3-cpu-int4-rtn-block-32-acc-level-4 -c C:\temp --extra_options include_prompt_templates=1

For more details on precision and execution providers, refer to these tutorials:

Load models into AI Toolkit

After conversion, move your ONNX model file into the newly created directory. The AI Toolkit automatically loads ONNX models from this directory upon activation.

You can find your models in the MY MODELS view. To use a model, double-click its name or open TOOLS > Playground and select the model from the dropdown list to start interacting with it.

Note: The AI Toolkit does not support deleting manually added models directly. To remove a model, delete its directory manually.

Supported models for conversion

The following table lists models supported for conversion to ONNX format in the AI Toolkit:

Support Matrix Supported now Under development On the roadmap
Model architectures DeepSeek, Gemma, Llama, Mistral, Phi (Language + Vision), Qwen, Nemotron, Granite, AMD OLMo Whisper Stable Diffusion
羡字五行属什么 吃完紧急避孕药不能吃什么 胆固醇是什么东西 威士忌是什么酿造的 亮油什么时候涂
嘴巴右下角有痣代表什么 收阴是什么意思 蜗牛有什么特点 家里为什么有小飞虫 tct检查是什么检查
北京朝阳医院擅长什么 乳腺结节3类什么意思 柠檬配什么泡水喝最好 犹太人什么意思 黄斑前膜是什么病
威士忌是什么酿造的 天葵是什么 菌群异常是什么意思 尿毒症是什么原因导致的 叶黄素什么时间吃最好
富察氏是什么旗hcv8jop1ns0r.cn 慢性胃炎是什么原因引起的hcv8jop0ns5r.cn 桃花依旧笑春风什么意思hcv8jop1ns4r.cn 苍耳是什么东西hcv8jop8ns9r.cn 聚焦是什么意思hcv8jop9ns2r.cn
喉咙肿痛吃什么药hcv7jop7ns3r.cn 左眼跳什么意思hcv7jop6ns6r.cn 染什么颜色hcv7jop5ns3r.cn 2028年属什么生肖hcv7jop9ns6r.cn 偏头疼吃什么药好chuanglingweilai.com
不拉屎是什么原因hcv8jop2ns3r.cn 凌波仙子是什么意思zhiyanzhang.com 形婚是什么意思啊hcv9jop0ns8r.cn 翘嘴鱼是什么鱼hcv8jop8ns8r.cn 先下手为强是什么意思hcv9jop4ns1r.cn
股骨头坏死什么症状hcv8jop4ns1r.cn 排骨炖什么最好吃hcv9jop5ns2r.cn 什么叫冷暴力wmyky.com 什么是活珠子hcv9jop6ns2r.cn 尿肌酐低说明什么hcv9jop2ns3r.cn
百度