# 🤗Optimum

**URL:** /static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fc%2Foptimum%2F59.md

[Latest](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Flatest.md) · [Categories](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fcategories.md)

---

## [About the 🤗 Optimum category](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fabout-the-optimum-category%2F16096)

<div class="topic-metadata">

**Author:** [@sgugger](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsgugger)%5C
**Replies:** 0

</div>

This category is for any discussion around the Optimum library.

---

## [Списали средтва и не дали подписку](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftopic%2F172966)

<div class="topic-metadata">

**Author:** [@grasss061](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fgrasss061)%5C
**Replies:** 0\
**Last updated:** [January 31, 2026, 7:45am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftopic%2F172966 "2026-01-31T07:45:45Z")

</div>

ПРи оформлении подписки п PRO” забрали сумму 30$ и подписки нет

---

## [CUDA OOM when export a large model to ONNX](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcuda-oom-when-export-a-large-model-to-onnx%2F31877)

<div class="topic-metadata">

**Author:** [@in-certo](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fin-certo)%5C
**Replies:** 6\
**Last updated:** [July 26, 2025, 2:25pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcuda-oom-when-export-a-large-model-to-onnx%2F31877 "2025-07-26T14:25:15Z")

</div>

I got OOM when exporting a large model to ONNX. I wonder how Optimum handles this issue. Here are my settings The code works for a smaller model with fewer parameters, so the error is due to the model size. Not able t…

---

## [Difference in the vector generated by the int8 quantized model vs base onnx model](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdifference-in-the-vector-generated-by-the-int8-quantized-model-vs-base-onnx-model%2F164270)

<div class="topic-metadata">

**Author:** [@Rkoy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRkoy)%5C
**Replies:** 4\
**Last updated:** [July 25, 2025, 9:08am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdifference-in-the-vector-generated-by-the-int8-quantized-model-vs-base-onnx-model%2F164270 "2025-07-25T09:08:28Z")

</div>

Recently i tried to compare the BAAI/bge-m3 Onnx model vs its int8 AVX2 quantized version. I see that there is a huge difference in the vectors generated by the base Onnx model vs the vectors generated by the int8 avx2 q…

---

## [Difference between model.onnx and model.onnx.data](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdifference-between-model-onnx-and-model-onnx-data%2F162032)

<div class="topic-metadata">

**Author:** [@Rkoy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRkoy)%5C
**Replies:** 2\
**Last updated:** [July 8, 2025, 9:17am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdifference-between-model-onnx-and-model-onnx-data%2F162032 "2025-07-08T09:17:18Z")

</div>

Hi team, i am new to optimum and have used the onnxruntime library a bit previously. When i try to convert a model using onnxruntime, i get only one output file say model.onnx but when i tried the below command of the …

---

## [What does the decoder with past values means](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-does-the-decoder-with-past-values-means%2F21088)

<div class="topic-metadata">

**Author:** [@Rkoy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FRkoy)%5C
**Replies:** 2\
**Last updated:** [July 7, 2025, 11:06am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-does-the-decoder-with-past-values-means%2F21088 "2025-07-07T11:06:34Z")

</div>

Those three parts consist of the encoder, the “decoder” (which actually consists of the decoder with the language modeling head), and the “decoder” with pre-computed key/values as additional inputs. This specific export…

---

## [How do I upstream a brand-new hardware backend to 🤗 Transformers/Optimum?](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-do-i-upstream-a-brand-new-hardware-backend-to-transformers-optimum%2F161297)

<div class="topic-metadata">

**Author:** [@halflucifer](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhalflucifer)%5C
**Replies:** 2\
**Last updated:** [July 2, 2025, 2:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-do-i-upstream-a-brand-new-hardware-backend-to-transformers-optimum%2F161297 "2025-07-02T02:37:46Z")

</div>

Hi everyone! :waving\_hand: I’m part of the team behind xThought, an upcoming AI accelerator hardware for LLM inference. We’ve already built a working Transformers extension (xthought\_transformers) that ships: XThough…

---

## [ONNX export failed for Qwen/Qwen3-Embedding-0.6B with "invalid unordered\_map\<K, T\> key"](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fonnx-export-failed-for-qwen-qwen3-embedding-0-6b-with-invalid-unordered-map-k-t-key%2F160909)

<div class="topic-metadata">

**Author:** [@Colegero](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FColegero)%5C
**Replies:** 4\
**Last updated:** [June 27, 2025, 10:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fonnx-export-failed-for-qwen-qwen3-embedding-0-6b-with-invalid-unordered-map-k-t-key%2F160909 "2025-06-27T22:39:09Z")

</div>

Hello everyone, I am trying to export the “Qwen/Qwen3-Embedding-0.6B” model to ONNX using the “optimum” library. According to the Optimum documentation, the “Qwen3” architecture is supported for ONNX export. However,…

---

## [\[Guide\] Quantize LLM CoreML to int8 on Mac ARM (TinyLlama, May 2025, tested workflow & script)](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fguide-quantize-llm-coreml-to-int8-on-mac-arm-tinyllama-may-2025-tested-workflow-script%2F156842)

<div class="topic-metadata">

**Author:** [@GreenBull31](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FGreenBull31)%5C
**Replies:** 0\
**Last updated:** [May 26, 2025, 10:59am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fguide-quantize-llm-coreml-to-int8-on-mac-arm-tinyllama-may-2025-tested-workflow-script%2F156842 "2025-05-26T10:59:18Z")

</div>

Hi all, Like many devs here, I spent a lot of time looking for a working, recent and clear pipeline to quantize LLM CoreML models (.mlpackage) to int8 on Mac ARM (Apple Silicon). Most existing guides are out of date, b…

---

## [Trying to convert DeepSeek-R1 into onnx](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-convert-deepseek-r1-into-onnx%2F145528)

<div class="topic-metadata">

**Author:** [@venkatesh35](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fvenkatesh35)%5C
**Replies:** 1\
**Last updated:** [March 13, 2025, 4:39pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrying-to-convert-deepseek-r1-into-onnx%2F145528 "2025-03-13T16:39:57Z")

</div>

I’m trying to convert DeepSeek-R1 into a onnx format, but i’m being presented with ValueError: Loading deepseek-ai/DeepSeek-R1 requires you to execute the configuration file in that repo on your local machine. Make sur…

---

## [Optimum library optimization and quantization fails](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Foptimum-library-optimization-and-quantization-fails%2F72629)

<div class="topic-metadata">

**Author:** [@ddahlmeier](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fddahlmeier)%5C
**Replies:** 8\
**Last updated:** [February 22, 2025, 6:50am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Foptimum-library-optimization-and-quantization-fails%2F72629 "2025-02-22T06:50:07Z")

</div>

I used optimum and onnxruntime to optimize and quantize a roberta squad QA model using the example from this blog The code used to work fine until this week when it started to break. I suddenly get an error when quant…

---

## [Paligemma2 onnx export KeyError: "Unknown task: image-text-to-text](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpaligemma2-onnx-export-keyerror-unknown-task-image-text-to-text%2F139726)

<div class="topic-metadata">

**Author:** [@biswajitdevsarma](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fbiswajitdevsarma)%5C
**Replies:** 4\
**Last updated:** [February 11, 2025, 4:19pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fpaligemma2-onnx-export-keyerror-unknown-task-image-text-to-text%2F139726 "2025-02-11T16:19:03Z")

</div>

Hi , I tried to convert the paligemma2 3B parameter model with 224 image resolution to onnx using optimum and got this error: $optimum-cli export onnx --model google/paligemma-3b-pt-224 paligemma-3b-pt-224\_onnx/ KeyEr…

---

## [Optimum-habana not working!](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Foptimum-habana-not-working%2F139883)

<div class="topic-metadata">

**Author:** [@DSNG1830](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FDSNG1830)%5C
**Replies:** 2\
**Last updated:** [February 10, 2025, 6:10pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Foptimum-habana-not-working%2F139883 "2025-02-10T18:10:42Z")

</div>

please help me

---

## [Incorrect Cross Attention Values from Generate Function of ORTModelForVision2Seq](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fincorrect-cross-attention-values-from-generate-function-of-ortmodelforvision2seq%2F138375)

<div class="topic-metadata">

**Author:** [@ctufts](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fctufts)%5C
**Replies:** 3\
**Last updated:** [February 1, 2025, 8:33pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fincorrect-cross-attention-values-from-generate-function-of-ortmodelforvision2seq%2F138375 "2025-02-01T20:33:21Z")

</div>

I’ve converted a DONUT model to fp16 to ONNX with optimum utilizing the onnx\_export\_from\_model function: model = VisionEncoderDecoderModel.from\_pretrained(model\_dir) model.load\_state\_dict(state\_dict, assign=True) model…

---

## [Inference on models with custom head](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-on-models-with-custom-head%2F137621)

<div class="topic-metadata">

**Author:** [@kaushu42](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkaushu42)%5C
**Replies:** 1\
**Last updated:** [January 28, 2025, 11:18am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Finference-on-models-with-custom-head%2F137621 "2025-01-28T11:18:08Z")

</div>

Hi, I trained a BERT model with a custom classifier head. I tried to load is using the ORTModelForSequenceClassification, but it did not load the proper classifier heads. It just loaded the default heads. After several…

---

## [Supported models](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsupported-models%2F135072)

<div class="topic-metadata">

**Author:** [@ES-CONVERGE](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FES-CONVERGE)%5C
**Replies:** 6\
**Last updated:** [January 14, 2025, 8:49am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsupported-models%2F135072 "2025-01-14T08:49:28Z")

</div>

Trying to compile a transformers model I’m using Getting KeyError: "hyenadna is not supported yet for transformers. Only \['...'\] are supported for the library transformers. If you want to support hyenadna please prop…

---

## [Qwen/Qwen1.5-7B-Chat RuntimeError: The serialized model is larger than the 2GiB ORTModelForCausalLM](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fqwen-qwen1-5-7b-chat-runtimeerror-the-serialized-model-is-larger-than-the-2gib-ortmodelforcausallm%2F133817)

<div class="topic-metadata">

**Author:** [@SantoshHF](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FSantoshHF)%5C
**Replies:** 2\
**Last updated:** [January 1, 2025, 9:23am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fqwen-qwen1-5-7b-chat-runtimeerror-the-serialized-model-is-larger-than-the-2gib-ortmodelforcausallm%2F133817 "2025-01-01T09:23:37Z")

</div>

from optimum.onnxruntime import ORTModelForCausalLM base\_model\_name = “Qwen/Qwen1.5-7B-Chat” ort\_model = ORTModelForCausalLM.from\_pretrained( base\_model\_name, use\_io\_binding=True, export=True, ) RuntimeError: The …

---

## [Error when running examples in optimum habana](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-when-running-examples-in-optimum-habana%2F74944)

<div class="topic-metadata">

**Author:** [@darkhorse82](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdarkhorse82)%5C
**Replies:** 2\
**Last updated:** [October 30, 2024, 5:13pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-when-running-examples-in-optimum-habana%2F74944 "2024-10-30T17:13:37Z")

</div>

Hello guys, Running a summarization examples in optimum habana and seeing this errors: (gaudi2-demo-env) test1@smgailab-SYS-820GH-TNR2:~/demo/optimum-habana/examples/translation$ python3 run\_translation.py –model\_n…

---

## [Question about the infernce flow for optimum exported decoder merged onnx model](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fquestion-about-the-infernce-flow-for-optimum-exported-decoder-merged-onnx-model%2F111280)

<div class="topic-metadata">

**Author:** [@Spedon](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FSpedon)%5C
**Replies:** 3\
**Last updated:** [October 11, 2024, 9:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fquestion-about-the-infernce-flow-for-optimum-exported-decoder-merged-onnx-model%2F111280 "2024-10-11T09:31:39Z")

</div>

Dear Huggingface Community I’ve recently encountered some difficulties with model inference, specifically, I want to use numpy and onnxruntime (without relying on transformers and torch) to infer a VisionDecoderEncoder …

---

## [Compiling SD1.5 for Neuron with resolution other than 512x512 fails](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcompiling-sd1-5-for-neuron-with-resolution-other-than-512x512-fails%2F106321)

<div class="topic-metadata">

**Author:** [@hgfckwla](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhgfckwla)%5C
**Replies:** 5\
**Last updated:** [September 26, 2024, 9:24am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcompiling-sd1-5-for-neuron-with-resolution-other-than-512x512-fails%2F106321 "2024-09-26T09:24:18Z")

</div>

I’m trying to export SD 1.5 into a portrait mode resolution 512x768 for use with Neuron / Inferentia 2. This is my export command: optimum-cli export neuron \\ --model jyoung105/stable-diffusion-v1-5 \\ --task sta…

---

## [Error while optimizing seq2seq model using optimum](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-while-optimizing-seq2seq-model-using-optimum%2F101180)

<div class="topic-metadata">

**Author:** [@LearnToGrow](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FLearnToGrow)%5C
**Replies:** 1\
**Last updated:** [September 16, 2024, 6:36pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-while-optimizing-seq2seq-model-using-optimum%2F101180 "2024-09-16T18:36:40Z")

</div>

I could not reproduce this example transformers==4.42.4 torch== 2.4.0+cpu onnx==1.16.2 onnxruntime==1.18.1 optimum==1.21.2 from transformers import AutoTokenizer from optimum.onnxruntime import OptimizationConfig,…

---

## [Neuron StableDiffusion ControlNet Pipeline fails when used with 2 controlnets](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fneuron-stablediffusion-controlnet-pipeline-fails-when-used-with-2-controlnets%2F105189)

<div class="topic-metadata">

**Author:** [@hgfckwla](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhgfckwla)%5C
**Replies:** 3\
**Last updated:** [September 11, 2024, 10:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fneuron-stablediffusion-controlnet-pipeline-fails-when-used-with-2-controlnets%2F105189 "2024-09-11T10:31:44Z")

</div>

I want to use 2 ControlNets with SD1.5 on AWS Inferentia2 / Neuron. It seems to be supported but at runtime it fails with: Loading only U-Net into both Neuron Cores... Traceback (most recent call last): File "test-con…

---

## [How can I export a transformers model into onnx that not supported with optimum yet](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-can-i-export-a-transformers-model-into-onnx-that-not-supported-with-optimum-yet%2F104590)

<div class="topic-metadata">

**Author:** [@J4BEZ](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJ4BEZ)%5C
**Replies:** 8\
**Last updated:** [August 30, 2024, 11:25am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-can-i-export-a-transformers-model-into-onnx-that-not-supported-with-optimum-yet%2F104590 "2024-08-30T11:25:32Z")

</div>

What does OP want? I want to export the RT-DETR model to the ONNX model. Which articles OP had read? I have read Export to ONNX (huggingface.co) and Export a model to ONNX with optimum.exporters.onnx (huggingface.co) W…

---

## [Can I convert llama 2 "Chat" model into onnx using llama/convert\_to\_onnx.py script?](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcan-i-convert-llama-2-chat-model-into-onnx-using-llama-convert-to-onnx-py-script%2F67960)

<div class="topic-metadata">

**Author:** [@Kainat98](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FKainat98)%5C
**Replies:** 5\
**Last updated:** [August 26, 2024, 8:25am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcan-i-convert-llama-2-chat-model-into-onnx-using-llama-convert-to-onnx-py-script%2F67960 "2024-08-26T08:25:18Z")

</div>

I have converted llama-2-13b-chat-hf model into onnx model using this script “(onnxruntime/onnxruntime/python/tools/transformers/models/llama at main · microsoft/onnxruntime · GitHub) /convert\_to\_onnx.py” i just had to…

---

## [Optimum Failed download of jina-embeddings-v2-base-es](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Foptimum-failed-download-of-jina-embeddings-v2-base-es%2F102393)

<div class="topic-metadata">

**Author:** [@Benitoski](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBenitoski)%5C
**Replies:** 4\
**Last updated:** [August 19, 2024, 1:53pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Foptimum-failed-download-of-jina-embeddings-v2-base-es%2F102393 "2024-08-19T13:53:34Z")

</div>

Hi, I’m trying to download jina-embeddings-v2-base-es as onnx with the following command: !optimum-cli export onnx --opset 16 --trust-remote-code -m jinaai/jina-embeddings-v2-base-es jina\_embeddings\_v2\_base\_es And g…

---

## [Optimum/Neuron: RuntimeError: forward() is missing value for argument 'argument\_4'](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Foptimum-neuron-runtimeerror-forward-is-missing-value-for-argument-argument-4%2F101943)

<div class="topic-metadata">

**Author:** [@hgfckwla](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhgfckwla)%5C
**Replies:** 1\
**Last updated:** [August 13, 2024, 9:18pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Foptimum-neuron-runtimeerror-forward-is-missing-value-for-argument-argument-4%2F101943 "2024-08-13T21:18:15Z")

</div>

I’m trying to render an image on AWS Inferentia2 using Optimum NeuronX. I have converted juggernautXL\_v8Rundiffusion model to the Diffusers format using sdxl-to-diffusers-v2 and then to Neuron format with: optimum-cli e…

---

## [What value should the sequence\_length parameter be when converting to TFLite](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-value-should-the-sequence-length-parameter-be-when-converting-to-tflite%2F101756)

<div class="topic-metadata">

**Author:** [@ADarkDividedGem](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FADarkDividedGem)%5C
**Replies:** 0\
**Last updated:** [August 10, 2024, 10:47am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwhat-value-should-the-sequence-length-parameter-be-when-converting-to-tflite%2F101756 "2024-08-10T10:47:27Z")

</div>

I am converting a model hosted by HuggingFace to a TensorFlow Lite model by using HuggingFace’s Optimum exporter. In their documentation they use the following example: optimum-cli export tflite --model google-bert/ber…

---

## [How to export a fine-tuned SDXL model?](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-export-a-fine-tuned-sdxl-model%2F101424)

<div class="topic-metadata">

**Author:** [@hgfckwla](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhgfckwla)%5C
**Replies:** 4\
**Last updated:** [August 9, 2024, 5:20am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-export-a-fine-tuned-sdxl-model%2F101424 "2024-08-09T05:20:05Z")

</div>

I’m trying to use AWS Inferentia 2 (NeuronX) for a more efficient SD-XL image generation. The base model works fine, I can export it to Neuron with this and then use: optimum-cli export neuron \\ --model stabilityai/st…

---

## [Make Text Embedding Server compatible](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmake-text-embedding-server-compatible%2F100937)

<div class="topic-metadata">

**Author:** [@Saugatkafley](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FSaugatkafley)%5C
**Replies:** 2\
**Last updated:** [August 8, 2024, 5:56am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmake-text-embedding-server-compatible%2F100937 "2024-08-08T05:56:37Z")

</div>

I have cloned embedding model udever-bloom-1b1. At first it asked for onnx files as it didnt have so i convert them to onnx. Then pushed to my repo here I also configured config.json with {"max\_position\_embeddings": 2…

---

## [Exporting SegFormer Image Processor to ONNX Format Using "optimum.exporters.onnx.onnx\_export\_from\_model"](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fexporting-segformer-image-processor-to-onnx-format-using-optimum-exporters-onnx-onnx-export-from-model%2F100038)

<div class="topic-metadata">

**Author:** [@soypablo](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsoypablo)%5C
**Replies:** 0\
**Last updated:** [July 30, 2024, 6:37am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fexporting-segformer-image-processor-to-onnx-format-using-optimum-exporters-onnx-onnx-export-from-model%2F100038 "2024-07-30T06:37:54Z")

</div>

I want to convert SegFormer(include imageprocessor) to ONNX format. import requests from PIL import Image from optimum.onnxruntime import ORTModelForSemanticSegmentation from optimum.exporters.onnx import onnx\_export\_fr…

[Next page](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fc%2Foptimum%2F59.md%3Fpage%3D1)
