Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Question about supporting Float16Array #1338

Open
Labels
questionFurther information is requested
@xmcp

Description

@xmcp

Question

I am trying transformers.js with WebGPU. The performance is great, but I found that transformers.js returns a Float32Array where the model is quantized tofp16:

constextractor=awaitpipeline("feature-extraction","bge-small-zh-v1.5",{device:"webgpu",dtype:"fp16",local_files_only:true,},);// ...constembeddings=awaitextractor(texts,{pooling:"mean",normalize:true});console.log(embeddings.data);// -> Float32Array(5120000) [...]

Since the model itself has only 16-bit precision, returning a Float32Array (instead ofFloat16Array that is supported in latest browsers) seems a waste of performance. Is this comment correct, and do we have plans to support Float16Array for better performance? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp