Skip to content

Commit

Permalink
[Model] Support Qwen2.5 Instruct and Coder (#564)
Browse files Browse the repository at this point in the history
This PR adds the following models to prebuilt list:
- Qwen2.5-0.5B - `q0f16`, `q0f32`, `q4f16_1`, `q4f32_1`
- Qwen2.5-1.5B, 3B, 7B - `q4f16_1`, `q4f32_1`
- Qwen2.5-Coder-1.5B, 7B - `q4f16_1`, `q4f32_1`

Previous Qwen2 models are not deprecated.

All models reuse previous Qwen2 WASMs (except Qwen2.5-3B since Qwen2
does not have a 3B variant, which we compile at head with
mlc-ai/binary-mlc-llm-libs#139)
  • Loading branch information
CharlieFRuan committed Sep 19, 2024
1 parent 429e719 commit 1684e0f
Showing 1 changed file with 201 additions and 13 deletions.
214 changes: 201 additions & 13 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@ export const prebuiltAppConfig: AppConfig = {
},
// Qwen-2
{
model: "https://huggingface.co/mlc-ai/Qwen2-0.5B-Instruct-q4f16_1-MLC",
model_id: "Qwen2-0.5B-Instruct-q4f16_1-MLC",
model: "https://huggingface.co/mlc-ai/Qwen2.5-0.5B-Instruct-q4f16_1-MLC",
model_id: "Qwen2.5-0.5B-Instruct-q4f16_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
Expand All @@ -867,9 +867,22 @@ export const prebuiltAppConfig: AppConfig = {
context_window_size: 4096,
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2.5-0.5B-Instruct-q4f32_1-MLC",
model_id: "Qwen2.5-0.5B-Instruct-q4f32_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-0.5B-Instruct-q4f32_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: true,
vram_required_MB: 1060.2,
overrides: {
context_window_size: 4096,
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-0.5B-Instruct-q0f16-MLC",
model_id: "Qwen2-0.5B-Instruct-q0f16-MLC",
model_id: "Qwen2.5-0.5B-Instruct-q0f16-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
Expand All @@ -881,8 +894,8 @@ export const prebuiltAppConfig: AppConfig = {
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-0.5B-Instruct-q0f32-MLC",
model_id: "Qwen2-0.5B-Instruct-q0f32-MLC",
model: "https://huggingface.co/mlc-ai/Qwen2.5-0.5B-Instruct-q0f32-MLC",
model_id: "Qwen2.5-0.5B-Instruct-q0f32-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
Expand All @@ -894,8 +907,8 @@ export const prebuiltAppConfig: AppConfig = {
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-1.5B-Instruct-q4f16_1-MLC",
model_id: "Qwen2-1.5B-Instruct-q4f16_1-MLC",
model: "https://huggingface.co/mlc-ai/Qwen2.5-1.5B-Instruct-q4f16_1-MLC",
model_id: "Qwen2.5-1.5B-Instruct-q4f16_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
Expand All @@ -907,8 +920,8 @@ export const prebuiltAppConfig: AppConfig = {
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-1.5B-Instruct-q4f32_1-MLC",
model_id: "Qwen2-1.5B-Instruct-q4f32_1-MLC",
model: "https://huggingface.co/mlc-ai/Qwen2.5-1.5B-Instruct-q4f32_1-MLC",
model_id: "Qwen2.5-1.5B-Instruct-q4f32_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
Expand All @@ -920,8 +933,34 @@ export const prebuiltAppConfig: AppConfig = {
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-7B-Instruct-q4f16_1-MLC",
model_id: "Qwen2-7B-Instruct-q4f16_1-MLC",
model: "https://huggingface.co/mlc-ai/Qwen2.5-3B-Instruct-q4f16_1-MLC",
model_id: "Qwen2.5-3B-Instruct-q4f16_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2.5-3B-Instruct-q4f16_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: true,
vram_required_MB: 2504.76,
overrides: {
context_window_size: 4096,
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2.5-3B-Instruct-q4f32_1-MLC",
model_id: "Qwen2.5-3B-Instruct-q4f32_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2.5-3B-Instruct-q4f32_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: true,
vram_required_MB: 2893.64,
overrides: {
context_window_size: 4096,
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2.5-7B-Instruct-q4f16_1-MLC",
model_id: "Qwen2.5-7B-Instruct-q4f16_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
Expand All @@ -933,8 +972,65 @@ export const prebuiltAppConfig: AppConfig = {
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-7B-Instruct-q4f32_1-MLC",
model_id: "Qwen2-7B-Instruct-q4f32_1-MLC",
model: "https://huggingface.co/mlc-ai/Qwen2.5-7B-Instruct-q4f32_1-MLC",
model_id: "Qwen2.5-7B-Instruct-q4f32_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-7B-Instruct-q4f32_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: false,
vram_required_MB: 5900.09,
overrides: {
context_window_size: 4096,
},
},
// Qwen2.5-Coder
{
model:
"https://huggingface.co/mlc-ai/Qwen2.5-Coder-1.5B-Instruct-q4f16_1-MLC",
model_id: "Qwen2.5-Coder-1.5B-Instruct-q4f16_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-1.5B-Instruct-q4f16_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: false,
vram_required_MB: 5106.67,
overrides: {
context_window_size: 4096,
},
},
{
model:
"https://huggingface.co/mlc-ai/Qwen2.5-Coder-1.5B-Instruct-q4f32_1-MLC",
model_id: "Qwen2.5-Coder-1.5B-Instruct-q4f32_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-1.5B-Instruct-q4f32_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: false,
vram_required_MB: 5900.09,
overrides: {
context_window_size: 4096,
},
},
{
model:
"https://huggingface.co/mlc-ai/Qwen2.5-Coder-7B-Instruct-q4f16_1-MLC",
model_id: "Qwen2.5-Coder-7B-Instruct-q4f16_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-7B-Instruct-q4f16_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: false,
vram_required_MB: 5106.67,
overrides: {
context_window_size: 4096,
},
},
{
model:
"https://huggingface.co/mlc-ai/Qwen2.5-Coder-7B-Instruct-q4f32_1-MLC",
model_id: "Qwen2.5-Coder-7B-Instruct-q4f32_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
Expand Down Expand Up @@ -1186,6 +1282,98 @@ export const prebuiltAppConfig: AppConfig = {
context_window_size: 4096,
},
},
// Qwen-2
{
model: "https://huggingface.co/mlc-ai/Qwen2-0.5B-Instruct-q4f16_1-MLC",
model_id: "Qwen2-0.5B-Instruct-q4f16_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-0.5B-Instruct-q4f16_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: true,
vram_required_MB: 944.62,
overrides: {
context_window_size: 4096,
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-0.5B-Instruct-q0f16-MLC",
model_id: "Qwen2-0.5B-Instruct-q0f16-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-0.5B-Instruct-q0f16-ctx4k_cs1k-webgpu.wasm",
low_resource_required: true,
vram_required_MB: 1624.12,
overrides: {
context_window_size: 4096,
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-0.5B-Instruct-q0f32-MLC",
model_id: "Qwen2-0.5B-Instruct-q0f32-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-0.5B-Instruct-q0f32-ctx4k_cs1k-webgpu.wasm",
low_resource_required: true,
vram_required_MB: 2654.75,
overrides: {
context_window_size: 4096,
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-1.5B-Instruct-q4f16_1-MLC",
model_id: "Qwen2-1.5B-Instruct-q4f16_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-1.5B-Instruct-q4f16_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: true,
vram_required_MB: 1629.75,
overrides: {
context_window_size: 4096,
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-1.5B-Instruct-q4f32_1-MLC",
model_id: "Qwen2-1.5B-Instruct-q4f32_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-1.5B-Instruct-q4f32_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: true,
vram_required_MB: 1888.97,
overrides: {
context_window_size: 4096,
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-7B-Instruct-q4f16_1-MLC",
model_id: "Qwen2-7B-Instruct-q4f16_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-7B-Instruct-q4f16_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: false,
vram_required_MB: 5106.67,
overrides: {
context_window_size: 4096,
},
},
{
model: "https://huggingface.co/mlc-ai/Qwen2-7B-Instruct-q4f32_1-MLC",
model_id: "Qwen2-7B-Instruct-q4f32_1-MLC",
model_lib:
modelLibURLPrefix +
modelVersion +
"/Qwen2-7B-Instruct-q4f32_1-ctx4k_cs1k-webgpu.wasm",
low_resource_required: false,
vram_required_MB: 5900.09,
overrides: {
context_window_size: 4096,
},
},
// Llama-3
{
model: "https://huggingface.co/mlc-ai/Llama-3-8B-Instruct-q4f32_1-MLC",
Expand Down

0 comments on commit 1684e0f

Please sign in to comment.