Skip to content

Commit

Permalink
model: add Gemma 2 models
Browse files Browse the repository at this point in the history
  • Loading branch information
Neet-Nestor committed Aug 1, 2024
1 parent da9dce0 commit eca7b95
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 16 deletions.
53 changes: 44 additions & 9 deletions app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -626,13 +626,13 @@ export const DEFAULT_MODELS: ModelRecord[] = [
},
},
{
name: "gemma-2b-it-q4f16_1-MLC",
name: "gemma-2-2b-it-q4f16_1-MLC",
display_name: "Gemma",
provider: "Google",
size: "2B",
quantization: "q4f16_1",
family: "Gemma",
vram_required_MB: 1476.52,
vram_required_MB: 1895.3,
low_resource_required: false,
buffer_size_required_bytes: 262144000,
required_features: ["shader-f16"],
Expand All @@ -644,14 +644,13 @@ export const DEFAULT_MODELS: ModelRecord[] = [
},
},
{
name: "gemma-2b-it-q4f32_1-MLC",
name: "gemma-2-2b-it-q4f32_1-MLC",
display_name: "Gemma",
provider: "Google",
size: "2B",
quantization: "q4f32",

family: "Gemma",
vram_required_MB: 1750.66,
vram_required_MB: 2508.75,
low_resource_required: false,
buffer_size_required_bytes: 262144000,
recommended_config: {
Expand All @@ -662,13 +661,13 @@ export const DEFAULT_MODELS: ModelRecord[] = [
},
},
{
name: "gemma-2b-it-q4f16_1-MLC-1k",
name: "gemma-2-2b-it-q4f16_1-MLC-1k",
display_name: "Gemma",
provider: "Google",
size: "2B",
quantization: "q4f16_1",
family: "Gemma",
vram_required_MB: 1476.52,
vram_required_MB: 1583.3,
low_resource_required: true,
buffer_size_required_bytes: 262144000,
required_features: ["shader-f16"],
Expand All @@ -680,13 +679,13 @@ export const DEFAULT_MODELS: ModelRecord[] = [
},
},
{
name: "gemma-2b-it-q4f32_1-MLC-1k",
name: "gemma-2-2b-it-q4f32_1-MLC-1k",
display_name: "Gemma",
provider: "Google",
size: "2B",
quantization: "q4f32",
family: "Gemma",
vram_required_MB: 1750.66,
vram_required_MB: 1884.75,
low_resource_required: true,
buffer_size_required_bytes: 262144000,
recommended_config: {
Expand All @@ -696,6 +695,42 @@ export const DEFAULT_MODELS: ModelRecord[] = [
top_p: 0.95,
},
},
{
name: "gemma-2-9b-it-q4f16_1-MLC",
display_name: "Gemma",
provider: "Google",
size: "9B",
quantization: "q4f16",
family: "Gemma",
vram_required_MB: 6422.01,
low_resource_required: false,
buffer_size_required_bytes: 262144000,
required_features: ["shader-f16"],
recommended_config: {
temperature: 0.7,
presence_penalty: 0,
frequency_penalty: 1,
top_p: 0.95,
},
},
{
name: "gemma-2-9b-it-q4f32_1-MLC",
display_name: "Gemma",
provider: "Google",
size: "9B",
quantization: "q4f32",
family: "Gemma",
vram_required_MB: 8383.33,
low_resource_required: false,
buffer_size_required_bytes: 262144000,
required_features: ["shader-f16"],
recommended_config: {
temperature: 0.7,
presence_penalty: 0,
frequency_penalty: 1,
top_p: 0.95,
},
},
{
name: "stablelm-2-zephyr-1_6b-q4f16_1-MLC",
display_name: "StableLM",
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.47,
version: 0.48,
migrate: (persistedState, version) => {
if (version < 0.47) {
if (version < 0.48) {
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.51",
"@mlc-ai/web-llm": "^0.2.52",
"@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.51":
version "0.2.51"
resolved "https://registry.yarnpkg.com/@mlc-ai/web-llm/-/web-llm-0.2.51.tgz#73dced138262bf79a1bc082dd36dc6d1a928b54f"
integrity sha512-62aiDyiSzUah1vqnTcZvH3lFRjz4VM2CeIBp7QpcFgX2HPA3vVYhDbV0cOVGAfK1MfH1CipZiyjOjkQUGjjRTw==
"@mlc-ai/web-llm@^0.2.52":
version "0.2.52"
resolved "https://registry.yarnpkg.com/@mlc-ai/web-llm/-/web-llm-0.2.52.tgz#15c0496b3ce8c35bd0ac5d1dd92d30cdc6c055db"
integrity sha512-TRjAQsOCUf7vrwVeOZoBZtB9KnW9InWK2w85rJWL7IBSSW/znYsNdD3/opmEGtf7NTKr4RBIu+8RdnhcZoHk4A==
dependencies:
loglevel "^1.9.1"

Expand Down

0 comments on commit eca7b95

Please sign in to comment.