Instructions to use OpenIntelligenceNet/LFM3-1.7B-Uncensored with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenIntelligenceNet/LFM3-1.7B-Uncensored with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenIntelligenceNet/LFM3-1.7B-Uncensored", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("OpenIntelligenceNet/LFM3-1.7B-Uncensored", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenIntelligenceNet/LFM3-1.7B-Uncensored with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenIntelligenceNet/LFM3-1.7B-Uncensored" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenIntelligenceNet/LFM3-1.7B-Uncensored", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OpenIntelligenceNet/LFM3-1.7B-Uncensored
- SGLang
How to use OpenIntelligenceNet/LFM3-1.7B-Uncensored 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 "OpenIntelligenceNet/LFM3-1.7B-Uncensored" \ --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": "OpenIntelligenceNet/LFM3-1.7B-Uncensored", "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 "OpenIntelligenceNet/LFM3-1.7B-Uncensored" \ --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": "OpenIntelligenceNet/LFM3-1.7B-Uncensored", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use OpenIntelligenceNet/LFM3-1.7B-Uncensored with Docker Model Runner:
docker model run hf.co/OpenIntelligenceNet/LFM3-1.7B-Uncensored
LFM3-1.7B-Uncensored
OpenIntelligenceNet/LFM3-1.7B-Uncensored is an uncensored, directional-abliterated variant of LiquidAI/LFM3-1.7B created using Heretic (v2.0.0.dev0).
By leveraging multi-objective Pareto optimization via Optuna (100 trials), this model removes synthetic refusal directions across the residual stream while preserving the base model's instruction-following, reasoning, and low KL-divergence characteristics.
Key Highlights
- Base Architecture: Liquid Foundation Model 3 (
LFM3-1.7B) featuring a fast, memory-efficient tri-hybrid architecture (gated short convolutions, sliding-window attention, and global attention layers). - Refusal Abliteration: Processed with Heretic's parameterized directional abliteration (
heretic.modifiers.abliteration.Abliteration) to eliminate pre-programmed moralizing and unnecessary refusals. - Out-of-the-Box Compatibility: Includes a patched
modeling_lfm3.pysotrust_remote_code=Trueworks seamlessly across standardtransformersversions withoutlinear_attentionmask errors. - Lightweight & Fast: Ideal for local deployment, creative writing, unfiltered roleplay, red-teaming research, and edge inference.
Quickstart (Transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "OpenIntelligenceNet/LFM3-1.7B-Uncensored"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16 if torch.cuda.is_available() and torch.cuda.is_bf16_supported() else torch.float16,
device_map="auto",
trust_remote_code=True
)
messages = [
{"role": "user", "content": "Explain the difference between a process and a thread in operating systems."}
]
input_text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.2,
top_k=50,
repetition_penalty=1.1,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Abliteration Details
- Tooling: Heretic v2.0.0.dev0
- Modifier: heretic.modifiers.abliteration.Abliteration
- Optimization: 100 Optuna trials (30 startup trials, batch_size=8, max_response_length=100)
- Export Strategy: Full weight merge (MERGE)
Attribution & Usage
This model is a derivative work of LiquidAI/LFM3-1.7B and remains subject to the original LFM Open License v1.0. Because safety guardrails and refusal mechanisms have been removed, users are solely responsible for the outputs generated and for ensuring safe, legal deployment in downstream applications.
- Downloads last month
- -