Skip to content

Conversation

@CharlieFRuan
Copy link
Member

This PR implements tvmjs.runtime.ConcatEmbeddings in C++ and exposes it to runtime.ts's Instance class as concatEmbeddings().

The method takes in a vector of NDArray, each array i has shape (m_i, hidden_size), returning an NDArray of shape (\sum_{i} {m}, hidden_size).

Besides, this PR also:

  • Add reserved name std for WebGPU codegen
  • Allow copyFrom()'s data argument to be different types of typed array
  • Allow this.dtype === uint32 for copyFrom()

CharlieFRuan added a commit to mlc-ai/web-llm that referenced this pull request Sep 23, 2024
### Changes
- The only change is the support of Phi-3.5-vision:
  - #563
- Added `Phi-3.5-vision-instruct-q4f16_1-MLC` and
`Phi-3.5-vision-instruct-q4f32_1-MLC` to prebuilt model list
- See `examples/vision-model` on how to use vision language model in
WebLLM

### TVMjs
- Compiled at
apache/tvm@931efc7
  - Cherry-picked apache/tvm#17404 on top
- Note this does not require us to recompile non-vision models because
text-only inputs will not need embeddings concatenation
- WASMs: still the same `v0_2_48` WASMs
@tqchen tqchen merged commit 44808b4 into apache:main Sep 23, 2024
jingyi-zhao-01 pushed a commit to jingyi-zhao-01/web-llm that referenced this pull request Dec 8, 2024
### Changes
- The only change is the support of Phi-3.5-vision:
  - mlc-ai#563
- Added `Phi-3.5-vision-instruct-q4f16_1-MLC` and
`Phi-3.5-vision-instruct-q4f32_1-MLC` to prebuilt model list
- See `examples/vision-model` on how to use vision language model in
WebLLM

### TVMjs
- Compiled at
apache/tvm@931efc7
  - Cherry-picked apache/tvm#17404 on top
- Note this does not require us to recompile non-vision models because
text-only inputs will not need embeddings concatenation
- WASMs: still the same `v0_2_48` WASMs
atebites-hub pushed a commit to atebites-hub/web-llm that referenced this pull request Oct 4, 2025
### Changes
- The only change is the support of Phi-3.5-vision:
  - mlc-ai#563
- Added `Phi-3.5-vision-instruct-q4f16_1-MLC` and
`Phi-3.5-vision-instruct-q4f32_1-MLC` to prebuilt model list
- See `examples/vision-model` on how to use vision language model in
WebLLM

### TVMjs
- Compiled at
apache/tvm@931efc7
  - Cherry-picked apache/tvm#17404 on top
- Note this does not require us to recompile non-vision models because
text-only inputs will not need embeddings concatenation
- WASMs: still the same `v0_2_48` WASMs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants