forked from numerique-gouv/blocknote-llm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-config.ts
52 lines (48 loc) · 1.5 KB
/
app-config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { prebuiltAppConfig } from '@mlc-ai/web-llm';
export const modelLibURLPrefix =
'https://raw.githubusercontent.com/neigeantre/web-llm-croissantllm-libraries/main/';
export const modelHFURLPrefix = 'https://huggingface.co/llm-slayer/';
const models = [
'CroissantLLMChat-v0.1-q0f16',
'CroissantLLMChat-v0.1-q0f32',
'CroissantLLMChat-v0.1-q3f16_1',
'CroissantLLMChat-v0.1-q4f16_1',
'CroissantLLMChat-v0.1-q4f32_1',
];
prebuiltAppConfig.useIndexedDBCache = true;
if (prebuiltAppConfig.useIndexedDBCache) {
console.log('Using IndexedDB Cache');
} else {
console.log('Using Cache API');
}
export const appConfig = {
model_list: [
...prebuiltAppConfig.model_list,
{
model_url: modelHFURLPrefix + models[0] + '-MLC/resolve/main/',
model_id: models[0],
model_lib_url: modelLibURLPrefix + models[0] + '-webgpu.wasm',
},
{
model_url: modelHFURLPrefix + models[1] + '-MLC/resolve/main/',
model_id: models[1],
model_lib_url: modelLibURLPrefix + models[1] + '-webgpu.wasm',
},
{
model_url: modelHFURLPrefix + models[2] + '-MLC/resolve/main/',
model_id: models[2],
model_lib_url: modelLibURLPrefix + models[2] + '-webgpu.wasm',
},
{
model_url: modelHFURLPrefix + models[3] + '-MLC/resolve/main/',
model_id: models[3],
model_lib_url: modelLibURLPrefix + models[3] + '-webgpu.wasm',
},
{
model_url: modelHFURLPrefix + models[4] + '-MLC/resolve/main/',
model_id: models[4],
model_lib_url: modelLibURLPrefix + models[4] + '-webgpu.wasm',
},
],
use_web_worker: true,
};