Downloads · 30 days
0
Felladrin/mlc-chat-TinyLlama-1.1B-1T-OpenOrca-q4f32_1
mlc-chat-TinyLlama-1.1B-1T-OpenOrca-q4f32_1 is a machine learning model from Felladrin. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This is a compiled version of TinyLlama-1.1B-1T-OpenOrca for MLC Web-LLM, using q4f321 quantization.
Downloads · 30 days
0
Access
Public
Updated Nov 7, 2023
Repo size
692 MB
Likes
0
Public
Click a slice to open those files.
.bin689 MB · 99%
From the Hugging Face model README
This is a compiled version of TinyLlama-1.1B-1T-OpenOrca for MLC Web-LLM, using q4f32_1 quantization.
import * as webLLM from "@mlc-ai/web-llm";
const modelId = "TinyLlama-1.1B-1T-OpenOrca-q4f32_1";
const appConfig = {
model_list: [
{
model_url:
"https://huggingface.co/Felladrin/mlc-chat-TinyLlama-1.1B-1T-OpenOrca-q4f32_1/resolve/main/params/",
local_id: modelId,
},
],
model_lib_map: {
[modelId]:
"https://huggingface.co/Felladrin/mlc-chat-TinyLlama-1.1B-1T-OpenOrca-q4f32_1/resolve/main/TinyLlama-1.1B-1T-OpenOrca-q4f32_1-webgpu.wasm",
},
};
const chatConfig = {
temperature: 0.7,
repetition_penalty: 1.2,
top_p: 0.95
};
async function main() {
const chat = new webLLM.ChatModule();
await chat.reload(modelId, chatConfig, appConfig);
let lastResponse = "";
const generateProgressCallback = (_, message = "") => {
if (message.length === 0) return chat.interruptGenerate();
lastResponse = message;
console.log(`Partial response: ${lastResponse}`);
};
const fistPrompt = "Hi! I have a question.";
await chat.generate(fistPrompt, generateProgressCallback);
console.log(`Complete response: ${lastResponse}`);
const secondPrompt =
"How to get in a good university?";
await chat.generate(secondPrompt, generateProgressCallback);
console.log(`Complete response: ${lastResponse}`);
console.info(await chat.runtimeStatsText());
}
main();