Safetensors
Japanese
English
lfm2

LFM2.5-2.6B-JP

A Japanese fine-tuned version of LiquidAI/LFM2.5-2.6B, trained using QLoRA.

Model Details

Property Value
Base Model LiquidAI/LFM2.5-2.6B
Model Type LFM2 (Liquid Foundation Model 2.5) — Dense, not MoE
Architecture Lfm2ForCausalLM
Parameters ~2.6B
Hidden Size 2048
Layers 30 (mixed convolution + full attention)
Attention Heads 32 (8 KV heads, GQA)
Context Length 131,072 tokens
Vocab Size 128,000
Precision BF16 (merged), Q4_K_M / Q8_0 / BF16 (GGUF)
License CC-BY-NC-SA-4.0 (inherited from training data)

Training Configuration

Key Settings

Parameter Value
Method QLoRA (4-bit) + Unsloth
LoRA Rank (r) 16
LoRA Alpha 32
LoRA Dropout 0
Target Modules Auto-detected: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, in_proj, out_proj, w1, w2, w3
Sequence Length 4096
Epochs 3
Learning Rate 2e-4
Gradient Accumulation 8 (effective batch size = 8)
Optimizer paged_adamw_8bit
LR Scheduler Cosine with 50 warmup steps
Weight Decay 0.01
Mixed Precision BF16 (RTX 3060 supports it)
Gradient Checkpointing Unsloth

Chat Template

Uses LFM2.5 native ChatML-like format (not qwen3-instruct):

<|startoftext|>|user|
User message
|assistant|
Assistant response
|user|
Next user message
|assistant|
...

Special tokens:

  • <|startoftext|> (BOS, id 124894)
  • |user| / |assistant| — role delimiters (in tokenizer as newline + special tokens)
  • <|pad|> (id 124893), <|endoftext|> (id 124895)

The training script verified the native template at runtime (preflight check) and uses train_on_responses_only with instruction_part="|user|" and response_part="|assistant|".

Dataset

Only msfm/ichikara-instruction-all (CC-BY-NC-SA-4.0).

  • Format: text (instruction) + output (response) → converted to chat template.
  • No data mixing; pure ichikara for license clarity (CC-BY-NC-SA-4.0).

Usage

Hugging Face Transformers (Python)

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "/path/to/LFM2.5-2.6B-JP-0811"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,  # Required for Lfm2ForCausalLM
)

messages = [
    {"role": "user", "content": "日本語で自己紹介してください。"}
]

# Apply chat template
prompt = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
)

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=True, temperature=0.7)
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)

llama.cpp (GGUF)

# Recommended: Q4_K_M (best quality/size ratio)
./llama-cli -m LFM2.5-2.6B-JP-Q4_K_M.gguf -p "<|startoftext|>|user|
日本語で自己紹介してください。
|assistant|
" -n 512 -cnv

Ollama (via Modelfile)

FROM ./LFM2.5-2.6B-JP-Q4_K_M.gguf
TEMPLATE """{{- bos_token -}}
{{- if .System }}|system|
{{ .System }}
|assistant|
{{- end }}
{{- range .Messages }}
{{- if eq .Role "user" }}|user|
{{ .Content }}
|assistant|
{{- else }}{{ .Content }}
|assistant|
{{- end }}
{{- end }}"""
PARAMETER stop "|user|"
PARAMETER stop "|assistant|"
PARAMETER stop "

"

License

This model inherits CC-BY-NC-SA-4.0 from the training dataset (msfm/ichikara-instruction-all).

  • Non-commercial — Commercial use prohibited.
  • ShareAlike — Derivatives must use the same license.
  • Attribution — Credit the original dataset authors.

The base model (LiquidAI/LFM2.5-2.6B) has its own license; please check the model card for details.

Downloads last month
-
Safetensors
Model size
3B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for CloudGoat/LFM2.5-2.6B-JP

Finetuned
(18)
this model
Quantizations
1 model

Dataset used to train CloudGoat/LFM2.5-2.6B-JP

Collection including CloudGoat/LFM2.5-2.6B-JP