The model is now added to WebAI.js. Run it in your browser with no code required.
Hi there,
We've packaged this model inside our open-source library WebAI.js, so you can now integrate it into your project easily with just a few lines of code:
import { WebAI } from '@axols/webai-js';
const webai = await WebAI.create({
modelId: "gemma-embedding-300m"
});
await webai.init({
mode: "webai",
precision: "q4",
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 Gemma Embedding Instantly (No Code Required)
You can benchmark and test the model directly here:
https://www.webai-js.com/models/gemma-embedding-300m/playground
📘 Full API Reference
Detailed parameter explanations can be found here:
https://www.webai-js.com/models/whisper-base/api-reference/v1/class-api/methods/webai-generate
🧡 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
Hi @AxolsWebAI ,
I really appreciate you showcasing the integration of the gemma-embedding-300m model into your WebAI.js library. It looks like a very straightforward and powerful way for developers to use it in their projects. Thanks for making it open source.
Thanks.

