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');
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.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support
Model tree for webnn/Florence-2-base
Base model
microsoft/Florence-2-base
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-text-to-text', 'webnn/Florence-2-base');