The model is now added to WebAI.js. Try it in your browser with no code required.
#5
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: "llama-3.2-1b-instruct"
});
await webai.init({
mode: "webai",
precision: "q4f16",
device: "webgpu"
});
const generation = await webai.generate({
userInput: {
messages: [
{
role: "user",
content: "Generate a Python code snippet for the Bubble Sort algorithm, make the answer concise."
}
]
},
modelConfig: {
max_new_tokens: 600,
temperature: 0.9
},
generateConfig: {
skip_special_tokens: true
}
});
// Or Stream generate easily
const generation = await webai.generateStream({
userInput: {
messages: [
{
role: "user",
content: "Generate me a new blog post about the benefits of AI in healthcare."
}
]
},
onStream: (chunk) => {
console.log(chunk);
}
});
🔬 Try Llama 3.2 1B instruct Instantly (No Code Required)
You can benchmark and test the model directly here:
https://www.webai-js.com/models/whisper-base/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 status to
closed
AxolsWebAI
changed discussion status to
open

