Run this model with HF Jobs

Run LiquidAI/LFM2-1.2B 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 and TRL to fine-tune https://huggingface.co/LiquidAI/LFM2-1.2B. 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-1.2B 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-1.2B. 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.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/LiquidAI/LFM2-1.2B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

How was LFM2 converted to ONNX? Is custom configuration needed for fine-tuned models

#14
by AmanPriyanshu - opened

Hi LiquidAI team,

Not sure, if this would be a better place to open this discussion rather than the ONNX-Community: https://huggingface.co/onnx-community/LFM2-1.2B-ONNX/discussions/1

I'm trying to convert a fine-tuned LFM2-1.2B model to ONNX but running into issues with the hybrid architecture (conv + attention layers).

My questions:

  1. How did you successfully convert the base LFM2 models to ONNX?
  2. Can you share the custom ONNX configuration you used?
  3. Is it possible to convert fine-tuned LFM2 models using the same approach?
  4. Is there a notebook I can follow along?

Use case: I have a fine-tuned LFM2-1.2B model that I need to deploy in ONNX format for edge inference using transformers.js.
Any guidance would be much appreciated! Thanks!

Continued and resolved discussion in ONNX link: https://huggingface.co/onnx-community/LFM2-1.2B-ONNX/discussions/1

AmanPriyanshu changed discussion status to closed

Sign up or log in to comment