Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vscode settings #65

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ node_modules
*.pem
dist
*.log
.vscode
*.wasm
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"prettier.configPath": ".prettierrc",
"editor.formatOnType": false,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"files.autoSave": "onFocusChange",
"prettier.requireConfig": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
85 changes: 53 additions & 32 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,30 @@ let SAMPLES = [
},

// WebGPU
{
id: "webgpu_llama32",
title: "Llama 3.2 1B",
desc: "Lightweight text-only model by Meta",
sampleUrl: "https://huggingface.co/spaces/webml-community/llama-3.2-webgpu",
models: ["llama"],
tasks: "Text Generation",
webApis: [BACKENDS.WEBGPU],
framework: "Transformers.js",
devices: [DEVICES.GPU],
update: "2024-10-02"
},
{
id: "webgpu_whisper_large",
title: "Whisper Large V3 Turbo",
desc: "Automatic speech recognition (ASR) with OpenAI Whisper Large V3 Turbo",
sampleUrl: "https://huggingface.co/spaces/webml-community/whisper-large-v3-turbo-webgpu",
models: ["Encoder", "Decoder"],
tasks: "Automatic Speech Recognition",
webApis: [BACKENDS.WEBGPU],
framework: "Transformers.js",
devices: [DEVICES.GPU],
update: "2024-10-02"
},
{
id: "webgpu_benchmark",
title: "Benchmark",
Expand Down Expand Up @@ -251,7 +275,7 @@ let SAMPLES = [
update: "2024-06-09"
},
{
id: "webgpu_whisper",
id: "webgpu_whisper_base",
title: "Whisper Base",
desc: "Real-time speech recognition with OpenAI Whisper across 100 different languages",
sampleUrl: "https://huggingface.co/spaces/Xenova/realtime-whisper-webgpu",
Expand Down Expand Up @@ -466,43 +490,40 @@ function constructSampleHTML(samples) {

<div class="flex 2xl:font-medium rounded-2xl bg-fuchsia-600/60 px-2 text-stone-50 w-auto">${sample.tasks}</div>

${
sample.models.length > 0
? ` ${sample.models
.map(
(model) =>
`<div class="flex 2xl:font-medium rounded-2xl bg-stone-600/80 px-2 text-stone-50 w-auto">${model}</div>`
)
.join("")}`
: ``
}
${sample.models.length > 0
? ` ${sample.models
.map(
(model) =>
`<div class="flex 2xl:font-medium rounded-2xl bg-stone-600/80 px-2 text-stone-50 w-auto">${model}</div>`
)
.join("")}`
: ``
}

<div
class="flex 2xl:font-medium rounded-2xl bg-teal-600/80 px-2 text-stone-50">${sample.framework}
</div>

${
sample.webApis.length > 0
? `
${sample.webApis.length > 0
? `
${sample.webApis
.map(
(api) =>
`<div class="flex 2xl:font-medium rounded-2xl bg-indigo-600/80 px-2 text-stone-50">${api}</div>`
)
.join("")}`
: ``
}

${
sample.devices.length > 0
? `${sample.devices
.map(
(device) =>
`<div class="flex 2xl:font-medium rounded-2xl bg-sky-600/80 px-2 text-stone-50">${device}</div>`
)
.join("")}`
: ``
}
.map(
(api) =>
`<div class="flex 2xl:font-medium rounded-2xl bg-indigo-600/80 px-2 text-stone-50">${api}</div>`
)
.join("")}`
: ``
}

${sample.devices.length > 0
? `${sample.devices
.map(
(device) =>
`<div class="flex 2xl:font-medium rounded-2xl bg-sky-600/80 px-2 text-stone-50">${device}</div>`
)
.join("")}`
: ``
}
</div>

</div>
Expand Down
Binary file added public/assets/webgpu_llama32.mp4
Binary file not shown.
Binary file added public/assets/webgpu_llama32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Binary file added public/assets/webgpu_whisper_large.mp4
Binary file not shown.
Binary file added public/assets/webgpu_whisper_large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading