optimum-intel-internal-testing / tiny-random-lfm2

huggingface.co
Total runs: 130.4K
24-hour runs: 0
7-day runs: 10.6K
30-day runs: 49.5K
Model's Last Updated: November 11 2025

Introduction of tiny-random-lfm2

Model Details of tiny-random-lfm2

Here is a code to create this tiny model:

import os

from transformers import AutoTokenizer
from transformers import Lfm2Config, Lfm2ForCausalLM

# === Step 1: Define tiny model config ===
config = Lfm2Config(
    num_hidden_layers=4,
    num_attention_heads=4,
    num_key_value_heads=4,
    intermediate_size=12,
    hidden_size=16,
    block_multiple_of=8
)

# === Step 2: Create model from config ===
model = Lfm2ForCausalLM(config)

# === Step 3: Load or create tokenizer ===
model_id = "LiquidAI/LFM2-350M"
tokenizer = AutoTokenizer.from_pretrained(model_id)

# === Step 4: Save model and tokenizer ===
output_dir = "./lfm2"
os.makedirs(output_dir, exist_ok=True)
model.save_pretrained(output_dir, safe_serialization=False)
tokenizer.save_pretrained(output_dir)

Runs of optimum-intel-internal-testing tiny-random-lfm2 on huggingface.co

130.4K
Total runs
0
24-hour runs
0
3-day runs
10.6K
7-day runs
49.5K
30-day runs

More Information About tiny-random-lfm2 huggingface.co Model

More tiny-random-lfm2 license Visit here:

https://choosealicense.com/licenses/apache-2.0

tiny-random-lfm2 huggingface.co

tiny-random-lfm2 huggingface.co is an AI model on huggingface.co that provides tiny-random-lfm2's model effect (), which can be used instantly with this optimum-intel-internal-testing tiny-random-lfm2 model. huggingface.co supports a free trial of the tiny-random-lfm2 model, and also provides paid use of the tiny-random-lfm2. Support call tiny-random-lfm2 model through api, including Node.js, Python, http.

optimum-intel-internal-testing tiny-random-lfm2 online free

tiny-random-lfm2 huggingface.co is an online trial and call api platform, which integrates tiny-random-lfm2's modeling effects, including api services, and provides a free online trial of tiny-random-lfm2, you can try tiny-random-lfm2 online for free by clicking the link below.

optimum-intel-internal-testing tiny-random-lfm2 online free url in huggingface.co:

https://huggingface.co/optimum-intel-internal-testing/tiny-random-lfm2

tiny-random-lfm2 install

tiny-random-lfm2 is an open source model from GitHub that offers a free installation service, and any user can find tiny-random-lfm2 on GitHub to install. At the same time, huggingface.co provides the effect of tiny-random-lfm2 install, users can directly use tiny-random-lfm2 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Url of tiny-random-lfm2

Provider of tiny-random-lfm2 huggingface.co

optimum-intel-internal-testing
ORGANIZATIONS

Other API from optimum-intel-internal-testing