The model is now added to WebAI.js. Try it in your browser with no code required.

#8
by AxolsWebAI - opened

Hi there,

We've packaged this model inside our open-source library WebAI.js, so you can now integrate it into your project with just a few lines of code:

import { WebAI } from '@axols/webai-js';

const webai = await WebAI.create({
   modelId: "bge-m3"
});

await webai.init({
  mode: "webai",
  precision: "fp16",
  device: "webgpu"
});

const generation = await webai.generate({
  userInput: {
    texts: [
      "Artificial intelligence is transforming the way we interact with technology.",
      "人工智能是一个构建能够推理、学习和行动的计算机和机器的科学领域,这种推理、学习和行动通常需要人类智力,或者涉及超出人类分析能力的数据规模。",
      "La IA es la columna vertebral de la innovación en la computación moderna, lo que genera valor para las personas y las empresas."
    ]
  },
  modelConfig: {
    normalize: true,
    pooling: "mean"
  },
  generateConfig: {}
});

🔬 Try Flag Embedding M3 Instantly (No Code Required)

You can benchmark and test the model directly here:
https://www.webai-js.com/models/clip-vit-base-patch32/playground

image


📘 Full API Reference

Detailed parameter explanations can be found here:
https://www.webai-js.com/models/bge-m3/api-reference/v1/class-api/methods/webai-generate

image


🧡 Fully Open Source

WebAI.js is completely open source and free to use.
Star or contribute on GitHub:
https://github.com/axolsai/webai-js

Thanks

Sign up or log in to comment