Skip to content

Commit

Permalink
model: add Phi 3.5 and Phi 3 instruct models
Browse files Browse the repository at this point in the history
  • Loading branch information
Neet-Nestor committed Aug 23, 2024
1 parent b1b0499 commit afd4861
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 26 deletions.
98 changes: 79 additions & 19 deletions app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,27 +180,26 @@ export const DEFAULT_MODELS: ModelRecord[] = [
},
},
{
name: "Phi-3-mini-4k-instruct-q4f16_1-MLC",
display_name: "Phi",
provider: "MLC",
name: "Phi-3.5-mini-instruct-q4f16_1-MLC",
display_name: "Phi 3.5",
provider: "Microsoft",
quantization: "q4f16_1",

family: "Phi 3 Mini",
family: "Phi 3.5 Mini",
vram_required_MB: 3672.07,
low_resource_required: false,
recommended_config: {
temperature: 0.7,
temperature: 1,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 0.95,
top_p: 1,
},
},
{
name: "Phi-3-mini-4k-instruct-q4f32_1-MLC",
display_name: "Phi",
provider: "MLC",
name: "Phi-3.5-mini-instruct-q4f32_1-MLC",
display_name: "Phi 3.5",
provider: "Microsoft",
quantization: "q4f32",
family: "Phi 3 Mini",
family: "Phi 3.5 Mini",
vram_required_MB: 5483.12,
low_resource_required: false,
recommended_config: {
Expand All @@ -211,26 +210,26 @@ export const DEFAULT_MODELS: ModelRecord[] = [
},
},
{
name: "Phi-3-mini-4k-instruct-q4f16_1-MLC-1k",
name: "Phi-3.5-mini-instruct-q4f16_1-MLC-1k",
display_name: "Phi",
provider: "MLC",
provider: "Microsoft",
quantization: "q4f16_1",
family: "Phi 3 Mini",
family: "Phi 3.5 Mini",
vram_required_MB: 2520.07,
low_resource_required: true,
recommended_config: {
temperature: 0.7,
temperature: 1,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 0.95,
top_p: 1,
},
},
{
name: "Phi-3-mini-4k-instruct-q4f32_1-MLC-1k",
name: "Phi-3.5-mini-instruct-q4f32_1-MLC-1k",
display_name: "Phi",
provider: "MLC",
provider: "Microsoft",
quantization: "q4f32",
family: "Phi 3 Mini",
family: "Phi 3.5 Mini",
vram_required_MB: 3179.12,
low_resource_required: true,
recommended_config: {
Expand Down Expand Up @@ -1074,6 +1073,67 @@ export const DEFAULT_MODELS: ModelRecord[] = [
top_p: 0.95,
},
},
// Phi3-mini-instruct
{
name: "Phi-3-mini-4k-instruct-q4f16_1-MLC",
display_name: "Phi 3",
provider: "Microsoft",
quantization: "q4f16",
family: "Phi 3 Mini Instruct",
vram_required_MB: 3672.07,
low_resource_required: false,
recommended_config: {
temperature: 0.7,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
},
},
{
name: "Phi-3-mini-4k-instruct-q4f32_1-MLC",
display_name: "Phi 3",
provider: "Microsoft",
quantization: "q4f32",
family: "Phi 3 Mini Instruct",
vram_required_MB: 5483.12,
low_resource_required: false,
recommended_config: {
temperature: 0.7,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
},
},
{
name: "Phi-3-mini-4k-instruct-q4f16_1-MLC-1k",
display_name: "Phi 3",
provider: "Microsoft",
quantization: "q4f16",
family: "Phi 3 Mini Instruct",
vram_required_MB: 2520.07,
low_resource_required: true,
recommended_config: {
temperature: 0.7,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
},
},
{
name: "Phi-3-mini-4k-instruct-q4f32_1-MLC-1k",
display_name: "Phi 3",
provider: "Microsoft",
quantization: "q4f32",
family: "Phi 3 Mini Instruct",
vram_required_MB: 3179.12,
low_resource_required: true,
recommended_config: {
temperature: 0.7,
presence_penalty: 0,
frequency_penalty: 0,
top_p: 1,
},
},
{
name: "Llama-2-7b-chat-hf-q4f32_1-MLC-1k",
display_name: "Llama",
Expand Down
4 changes: 2 additions & 2 deletions app/store/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ export const useAppConfig = createPersistStore(
}),
{
name: StoreKey.Config,
version: 0.5,
version: 0.51,
migrate: (persistedState, version) => {
if (version < 0.5) {
if (version < 0.51) {
return {
...DEFAULT_CONFIG,
...(persistedState as any),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@fortaine/fetch-event-source": "^3.0.6",
"@hello-pangea/dnd": "^16.5.0",
"@mlc-ai/web-llm": "^0.2.55",
"@mlc-ai/web-llm": "^0.2.62",
"@serwist/next": "^9.0.2",
"@svgr/webpack": "^6.5.1",
"emoji-picker-react": "^4.9.2",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1180,10 +1180,10 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"

"@mlc-ai/web-llm@^0.2.55":
version "0.2.55"
resolved "https://registry.yarnpkg.com/@mlc-ai/web-llm/-/web-llm-0.2.55.tgz#678c1703df1a9c9d504fc81db6d2f7b7c5d39d7b"
integrity sha512-o2Nzmx//sT3ttWrnSYy6s7NTCnBEWPI8ubbzg6WH59dAI34pHSP/+V8UxtDS+ZlEXl0PV0iDgl1i+Y1WeKABlw==
"@mlc-ai/web-llm@^0.2.62":
version "0.2.62"
resolved "https://registry.yarnpkg.com/@mlc-ai/web-llm/-/web-llm-0.2.62.tgz#cbe0e927e46f95a50f8292c4f5cfea5a9f0a2002"
integrity sha512-biEYs13nfNjRa4GRVXRsnXLk/yCTslxSH3OjW/4PjoyvZcCtcIe4Aks20WnrMpJMz63ezE6noJF2fkFWStsI0A==
dependencies:
loglevel "^1.9.1"

Expand Down

0 comments on commit afd4861

Please sign in to comment.