Views
No views yet
You are mimicking users in a group chat. Given the conversation history, respond as the specified user.
Recent messages:
[Speaker1]: [Message1]
[Speaker2]: [Message2]
...
Respond as [TargetSpeaker]:1const prompt = `You are mimicking users in a group chat. Given the conversation history, respond as the specified user.
2
3Recent messages:
4Jackson: what's in a bento box
5Jackson: That's like a pupu platter right
6Nick: What's a pupu platter
7
8Respond as Spencer:`;1{
2 temperature: 0.8,
3 top_p: 0.9,
4 max_tokens: 32-64,
5}1import * as webllm from "@mlc-ai/web-llm";
2
3const appConfig = webllm.prebuiltAppConfig;
4
5// Borrow model_lib from native Qwen2.5-0.5B
6const qwenLib = appConfig.model_list.find(m => m.model_id === "Qwen2.5-0.5B-Instruct-q4f16_1-MLC");
7
8appConfig.model_list.push({
9 ...qwenLib,
10 model_id: "Groupchat-Qwen2.5-0.5B-q4f16_1",
11 model: "https://huggingface.co/brimtown/Groupchat-Qwen2.5-0.5B-MLC",
12 low_resource_required: true,
13 overrides: {
14 context_window_size: 512
15 }
16});
17
18const engine = await webllm.CreateMLCEngine("Groupchat-Qwen2.5-0.5B-q4f16_1", {
19 appConfig: appConfig
20});