Image-Text-to-Text
Transformers.js
ONNX
lfm2_vl
liquid
lfm2
lfm2-vl
edge
lfm2.5
lfm2.5-vl
onnxruntime
webgpu
conversational
custom_code
Run this model with HF Jobs
Run LiquidAI/LFM2.5-VL-3B-ONNX on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/LiquidAI/LFM2.5-VL-3B-ONNX. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/LiquidAI/LFM2.5-VL-3B-ONNX on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/LiquidAI/LFM2.5-VL-3B-ONNX. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use LiquidAI/LFM2.5-VL-3B-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use LiquidAI/LFM2.5-VL-3B-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-text-to-text', 'LiquidAI/LFM2.5-VL-3B-ONNX');
LFM2.5-VL-3B-ONNX
LFM2.5 is a new generation of hybrid models developed by Liquid AI, specifically designed for edge AI and on-device deployment. It sets a new standard in terms of quality, speed, and memory efficiency.
Find more details in the original model card: https://huggingface.co/LiquidAI/LFM2.5-VL-3B
🏃 How to run LFM2.5-VL-3B
You can run the ONNX model in the browser with Transformers.js v4.0 or newer:
npm install @huggingface/transformers
import {
AutoModelForImageTextToText,
AutoProcessor,
load_image,
} from "@huggingface/transformers";
const modelId = "LiquidAI/LFM2.5-VL-3B-ONNX";
const processor = await AutoProcessor.from_pretrained(modelId);
const model = await AutoModelForImageTextToText.from_pretrained(modelId, {
device: "webgpu",
dtype: {
embed_tokens: "fp16",
decoder_model_merged: "q4",
vision_encoder: "fp16",
},
});
const messages = [
{
role: "user",
content: [
{ type: "image" },
{ type: "text", text: "Describe this image." },
],
},
];
const prompt = processor.apply_chat_template(messages, {
add_generation_prompt: true,
});
const image = await load_image("https://placecats.com/300/200");
const inputs = await processor(image, prompt, { add_special_tokens: false });
const outputs = await model.generate({
...inputs,
do_sample: true,
temperature: 0.2,
top_k: 50,
repetition_penalty: 1.0,
max_new_tokens: 256,
});
const generated = outputs.slice(null, [inputs.input_ids.dims.at(-1), null]);
console.log(processor.batch_decode(generated, { skip_special_tokens: true })[0]);
- Downloads last month
- 507