-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy path_shared.ts
48 lines (42 loc) · 979 Bytes
/
_shared.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
export enum ModelType {
Llama = "llama",
Mpt = "mpt",
GptJ = "gptj",
NeoX = "gptneox",
Bloom = "bloom",
Gpt2 = "gpt2"
}
export const modelTypeList = Object.values(ModelType)
export enum LicenseType {
Commercial = "Commercial",
NonCommercial = "Non-commercial",
Academic = "Academic",
OpenSource = "Open-source",
BigScience = "BigScience RAIL License v1.0",
MIT = "MIT",
Apache2 = "Apache-2.0",
GPL = "GPL"
}
export type ModelInfo = {
name?: string
size: number
downloadUrl: string
sha256: string
blake3: string
description: string
licenses: (LicenseType | string)[]
modelType: ModelType
tokenizers?: string[]
tags?: string[]
citations?: string[]
disabled?: boolean
promptTemplate?: string
}
export type ModelMap = Record<string, ModelInfo>
export const toList = (modelMap: ModelMap) =>
Object.entries(modelMap)
.map(([name, model]) => ({
name,
...model
}))
.filter((model) => !model.disabled)