Open jens-ghc opened 1 week ago
@jens-ghc Funny I was just about to open this bug myself when I saw you had opened it just a few hours ago :)
At least a simple
import {
pipeline,
type PipelineType,
// @ts-ignore temporary "fix"
type PretrainedModelOptions,
//...
} from '@huggingface/transformers';
Lets you work around it for now. Specifying the dtype via e.g.
const model = await pipeline(
'image-feature-extraction',
'Xenova/clip-vit-large-patch14-336',
{ dtype: 'fp16' }
)
still works as expected.
System Info
Transformers.js 3.0.1 running in node 18 using CommonJS
Environment/Platform
Description
When trying to import the
PretrainedModelOptions
type in my typescript application, I'm getting this error message:I'm getting a similar issue when trying to import the quantization data type that is mentioned in
PretrainedModelOptions
, (the datatype that contains e.g.q8
).The problem seems to be that neither
types/utils/hub.d.ts
nortypes/utils/dtypes.d.ts
are exported throughtypes/transformers.d.ts
Reproduction
Using this statement:
results in the error message.