Skip to content

Commit

Permalink
[Version] Bump version to 0.2.58, support embedding (#539)
Browse files Browse the repository at this point in the history
### Change

- Supports embedding via OpenAI API `engine.embeddings.create()`:
  - #538
- Currently, only `snowflake-arctic-embed-s` and
`snowflake-arctic-embed-m` are supported. We add the following models to
the prebuilt model list:
  - `snowflake-arctic-embed-m-q0f32-MLC-b32`
  - `snowflake-arctic-embed-m-q0f32-MLC-b4`
  - `snowflake-arctic-embed-s-q0f32-MLC-b32`
  - `snowflake-arctic-embed-s-q0f32-MLC-b4`
- `b32` means the model is compiled to support a maximum batch size of
32. If an input with more than 32 entries are provided, we will call
multiple `forward()` (e.g. if input has 67 entries, we forward 3 times).
The larger the maximum batch size, the more memory it takes to load the
model. See `ModelRecord.vram_required_MB` in `config.ts` for specifics.


### TVMjs
Still compiled at
apache/tvm@1fcb620,
no change
  • Loading branch information
CharlieFRuan authored Aug 12, 2024
1 parent 1690aa6 commit 552ec95
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion examples/abort-reload/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/cache-usage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"url": "^0.11.1"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57",
"@mlc-ai/web-llm": "^0.2.58",
"progressbar.js": "^1.1.0"
}
}
2 changes: 1 addition & 1 deletion examples/chrome-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"url": "^0.11.1"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57",
"@mlc-ai/web-llm": "^0.2.58",
"progressbar.js": "^1.1.0"
}
}
2 changes: 1 addition & 1 deletion examples/embeddings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "file:../..",
"@mlc-ai/web-llm": "^0.2.58",
"langchain": "0.2.15"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/get-started-web-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/get-started/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/json-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/json-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/logit-processor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/multi-round-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/next-simple-chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57",
"@mlc-ai/web-llm": "^0.2.58",
"@types/node": "20.3.3",
"@types/react": "18.2.14",
"@types/react-dom": "18.2.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/seed-to-reproduce/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/service-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/simple-chat-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/streaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
2 changes: 1 addition & 1 deletion examples/text-completion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57"
"@mlc-ai/web-llm": "^0.2.58"
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mlc-ai/web-llm",
"version": "0.2.57",
"version": "0.2.58",
"description": "Hardware accelerated language model chats on browsers",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion utils/vram_requirements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"url": "^0.11.3"
},
"dependencies": {
"@mlc-ai/web-llm": "^0.2.57",
"@mlc-ai/web-llm": "^0.2.58",
"tvmjs": "file:./../../tvm_home/web"
}
}

0 comments on commit 552ec95

Please sign in to comment.