The model is now added to WebAI.js. Run it in your browser with no code required.
#22
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 easily with just a few lines of code, letting you run it directly in the browser —no backend hosting required:
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
AxolsWebAI
changed discussion title from
The model is now added to WebAI.js. Play with it easily with no code required.
to The model is now added to WebAI.js. Run it in your browser with no code required.

