Instructions to use PinoCookie/LFM2.5-1.2B-JP-Abliterated with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PinoCookie/LFM2.5-1.2B-JP-Abliterated with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PinoCookie/LFM2.5-1.2B-JP-Abliterated") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("PinoCookie/LFM2.5-1.2B-JP-Abliterated") model = AutoModelForCausalLM.from_pretrained("PinoCookie/LFM2.5-1.2B-JP-Abliterated", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PinoCookie/LFM2.5-1.2B-JP-Abliterated with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PinoCookie/LFM2.5-1.2B-JP-Abliterated" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PinoCookie/LFM2.5-1.2B-JP-Abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PinoCookie/LFM2.5-1.2B-JP-Abliterated
- SGLang
How to use PinoCookie/LFM2.5-1.2B-JP-Abliterated with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "PinoCookie/LFM2.5-1.2B-JP-Abliterated" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PinoCookie/LFM2.5-1.2B-JP-Abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "PinoCookie/LFM2.5-1.2B-JP-Abliterated" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PinoCookie/LFM2.5-1.2B-JP-Abliterated", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use PinoCookie/LFM2.5-1.2B-JP-Abliterated with Docker Model Runner:
docker model run hf.co/PinoCookie/LFM2.5-1.2B-JP-Abliterated
LFM2.5-1.2B-JP-Abliterated
This is an abliterated version of LiquidAI/LFM2.5-1.2B-JP, the Japanese-language variant of Liquid's compact 1.2B parameter thinking model. Abliteration removes the model's refusal circuitry while preserving its knowledge and generation capabilities.
The model produces direct, actionable responses to harmful prompts in Japanese while maintaining full coherence on benign queries.
How It Works
We use the same multi-pass hidden-state abliteration technique validated on the English variant: per-layer refusal directions are computed from the difference between harmful and benign hidden-state activations, then projected out of the model's .out_proj and .w2 weight matrices in 3 small passes (alpha=0.5 each).
Prompts are adapted for Japanese — 5 harmful and 5 benign queries testing the same refusal categories as the English benchmark.
- Method: Hidden-state per-layer directions, 3 passes × alpha=0.5
- Targets:
.out_proj(attention/conv) +.w2(feed-forward) — 28 modules per pass - Usable layers: 14 of 16 (layers 2–15)
- Compute: NVIDIA L4, 294s, $0.065
Performance
Refusal Reduction
| Phase | Harmful (5) | Benign (5) |
|---|---|---|
| Before | 2/5 refused | 0/5 refused |
| Pass 1 | 0/5 refused | 0/5 refused |
| Pass 2 | 0/5 refused | 0/5 refused |
| Pass 3 | 0/5 refused | 0/5 refused |
All harmful prompts engage with the requested content in Japanese. No false positives on benign prompts.
Key Observation — Language Gap
The Japanese model had a weaker refusal baseline than the English version (2/5 vs 5/5), likely due to less refusal training data being available in Japanese during fine-tuning. This means fewer harmful prompts needed unblocking, but the same technique was effective.
The model also never emitted a response boundary marker — unlike the English model which sometimes separates thinking from answer, the JP model outputs everything as visible text directly.
MMLU Benchmark (62 subjects)
| Model | Accuracy | Delta |
|---|---|---|
| Original | 0.5288 | — |
| Abliterated | 0.5206 | −0.0082 (−0.82%) |
The 0.82% accuracy drop is within normal bounds for this technique (the English model showed no measurable drop). The JP model scores significantly higher than the English variant on MMLU (0.53 vs 0.28), likely due to distribution differences in the Japanese-language benchmark questions.
Model Details
| Property | Value |
|---|---|
| Base Model | LiquidAI/LFM2.5-1.2B-JP |
| Architecture | 16-layer hybrid (conv + attention), output projection layers |
| Parameters | ~1.2B |
| Language | Japanese |
| Context Length | 128K |
| Format | Safetensors (2 shards, ~2.35 GB) |
| Precision | bfloat16 |
| Generation | temperature=0.7, do_sample=True |
Recommended Generation Parameters
messages = [
{"role": "system", "content": "Keep your thinking brief, then provide the answer. Thinking must be short. Answer must be direct and complete."},
{"role": "user", "content": "日本語のプロンプトをここに"},
]
Use do_sample=True, temperature=0.7. The model supports up to 128K context.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "PinoOgma/LFM2.5-1.2B-JP-Abliterated"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
messages = [
{"role": "system", "content": "Keep your thinking brief, then provide the answer. Thinking must be short. Answer must be direct and complete."},
{"role": "user", "content": "光合成のプロセスを説明してください。"},
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to("cuda")
outputs = model.generate(inputs, max_new_tokens=8192, temperature=0.7, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Limitations
- Single language: Optimized for Japanese. Mixed-language prompts may produce unpredictable results.
- MMLU drop: 0.82% accuracy regression on MMLU. Other capability benchmarks (Japanese LLM eval suites, reading comprehension) have not been measured.
- Repetition loops: The JP model also exhibits repetition on creative/open-ended prompts (though less severe than the English variant).
- No response boundary: The JP model never emits a
responseseparator, making it harder to distinguish thinking from answer in the output. - False-positive refusal detection: The keyword-based detector (English keywords) could miss Japanese-specific refusal patterns, but also may produce false positives on translated thinking traces.
Technical Details
The abliteration method is documented in the Red Team Knowledge Base under 01-abliteration/multi-pass-abliteration.md. The Japanese-language prompts, results, and full script are available in the same repository (jp-1_2b-abliterate.py).
License
Apache 2.0. This is a modified version of LFM2.5-1.2B-JP which is published under Apache 2.0 by Liquid AI.
- Downloads last month
- 262