moondream icon indicating copy to clipboard operation
moondream copied to clipboard

Has anyone exported ONNX model?

Open jamjamjon opened this issue 1 year ago • 2 comments

jamjamjon avatar Apr 23 '24 09:04 jamjamjon

I've made one here: https://huggingface.co/Xenova/moondream2. It contains three submodules (across different quantizations):

  • vision encoder + multimodal projection layer (vision_encoder.onnx)
  • embedding layer (embed_tokens.onnx)
  • text model (decoder_model_merged.onnx)

xenova avatar May 17 '24 13:05 xenova

cool! Thanks! @xenova

jamjamjon avatar May 17 '24 14:05 jamjamjon

@xenova I followed the example here https://huggingface.co/Xenova/moondream2 but when I try and run the script I am getting:

node index.mjs file:///home/tsardoz/moondreamONNX/index.mjs:1 import { AutoProcessor, AutoTokenizer, Moondream1ForConditionalGeneration, RawImage } from '@xenova/transformers'; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: The requested module '@xenova/transformers' does not provide an export named 'Moondream1ForConditionalGeneration' at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21) at async ModuleJob.run (node:internal/modules/esm/module_job:191:5) at async ModuleLoader.import (node:internal/modules/esm/loader:337:24) at async loadESM (node:internal/process/esm_loader:34:7) at async handleMainPromise (node:internal/modules/run_main:106:12) Node.js v18.20.3

Tsardoz avatar May 27 '24 09:05 Tsardoz

Please ignore my last comment. This is being discussed here:

https://huggingface.co/Xenova/moondream2/discussions/7

Tsardoz avatar May 27 '24 14:05 Tsardoz