Run this model with HF Jobs

Run Bombek1/squeezebert-uncased-litert 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/Bombek1/squeezebert-uncased-litert. 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/Bombek1/squeezebert-uncased-litert 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.

squeezebert/squeezebert-uncased - LiteRT Optimized

This is a LiteRT (formerly TensorFlow Lite) export of squeezebert/squeezebert-uncased.

It is optimized for mobile and edge inference (Android/iOS/Embedded).

Model Details

Attribute Value
Task Feature Extraction
Format .tflite (Float32)
File Size 192.0 MB
Input Length 128 tokens
Output Dim 768

Usage

import numpy as np
from ai_edge_litert.interpreter import Interpreter
from transformers import AutoTokenizer

# Load model
interpreter = Interpreter(model_path="squeezebert_squeezebert-uncased.tflite")
interpreter.allocate_tensors()

tokenizer = AutoTokenizer.from_pretrained("squeezebert/squeezebert-uncased")

def get_embedding(text):
    inputs = tokenizer(text, max_length=128, padding="max_length", truncation=True, return_tensors="np")

    input_details = interpreter.get_input_details()
    interpreter.set_tensor(input_details[0]['index'], inputs['input_ids'].astype(np.int64))
    interpreter.set_tensor(input_details[1]['index'], inputs['attention_mask'].astype(np.int64))

    interpreter.invoke()

    output_details = interpreter.get_output_details()
    return interpreter.get_tensor(output_details[0]['index'])[0]

emb = get_embedding("Hello world")
print(f"Embedding shape: {emb.shape}")

Converted by Bombek1 using litert-torch

Downloads last month
16
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Bombek1/squeezebert-uncased-litert

Finetuned
(2)
this model