krassowski / jupyterlab-transformers-completer

Inline completion provider using tranformers.js for JupyterLab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phi-3 WebGPU support

krassowski opened this issue · comments

Transformers.js v3 will support Phi-3 with WebGPU acceleration xenova/transformers.js#545 (comment)

It would be amazing to get it running in this extension. For now there is no jsdelivr assets and unless we find a way to fix webpack, we need to relay on it:

// Note: neither importScripts nor module import worked, see:
// https://github.com/webpack/webpack/issues/16633
// https://github.com/webpack/webpack/issues/16173
// https://github.com/jupyterlab/jupyterlab/issues/10197
const transformers = (await import(
/* webpackIgnore: true */
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
'https://cdn.jsdelivr.net/npm/@xenova/transformers@2.6.2'
)) as transformersModule;