Instructions to use webnn/Florence-2-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use webnn/Florence-2-base with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-text-to-text', 'webnn/Florence-2-base');
metadata
base_model: microsoft/Florence-2-base
library_name: transformers.js
license: mit
pipeline_tag: image-text-to-text
tags:
- vision
- text-generation
- text2text-generation
- image-to-text
Changes for WebNN
Vision Encoder: Changed data type of Pow Y = 0.5 to float32 from float16 for fp16 and q4f16 models.
Based on: https://huggingface.co/onnx-community/Florence-2-base/ https://huggingface.co/microsoft/Florence-2-base with ONNX weights to be compatible with Transformers.js.