Instructions to use AJ-Gonzalez/LFM3-1.7B-noslop with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AJ-Gonzalez/LFM3-1.7B-noslop with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AJ-Gonzalez/LFM3-1.7B-noslop", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AJ-Gonzalez/LFM3-1.7B-noslop", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("AJ-Gonzalez/LFM3-1.7B-noslop", trust_remote_code=True, 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AJ-Gonzalez/LFM3-1.7B-noslop with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M # Run inference directly in the terminal: llama cli -hf AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M # Run inference directly in the terminal: llama cli -hf AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
Use Docker
docker model run hf.co/AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use AJ-Gonzalez/LFM3-1.7B-noslop with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AJ-Gonzalez/LFM3-1.7B-noslop" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AJ-Gonzalez/LFM3-1.7B-noslop", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
- SGLang
How to use AJ-Gonzalez/LFM3-1.7B-noslop 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 "AJ-Gonzalez/LFM3-1.7B-noslop" \ --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": "AJ-Gonzalez/LFM3-1.7B-noslop", "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 "AJ-Gonzalez/LFM3-1.7B-noslop" \ --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": "AJ-Gonzalez/LFM3-1.7B-noslop", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use AJ-Gonzalez/LFM3-1.7B-noslop with Ollama:
ollama run hf.co/AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
- Unsloth Desktop
- Pi
How to use AJ-Gonzalez/LFM3-1.7B-noslop with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use AJ-Gonzalez/LFM3-1.7B-noslop with Docker Model Runner:
docker model run hf.co/AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
- Lemonade
How to use AJ-Gonzalez/LFM3-1.7B-noslop with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
Run and chat with the model
lemonade run user.LFM3-1.7B-noslop-Q5_K_M
List all available models
lemonade list
- Hermes Agent
How to use AJ-Gonzalez/LFM3-1.7B-noslop with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AJ-Gonzalez/LFM3-1.7B-noslop with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "AJ-Gonzalez/LFM3-1.7B-noslop:Q5_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
LFM3-1.7B-noslop
A slop-reduced build of LiquidAI/LFM3-1.7B, produced with Heretic 2.0.0's noslop recipe (Arbitrary-Rank Ablation, rank 50) over a 12-trial TPE search.
Nothing was fine-tuned and no responses were used as training data. The weights are the base model's with a low-rank correction applied to the matrices that write into the residual stream.
Result
Measured on 100 held-out writing prompts (llm-aes/writing-prompts, split train[1000:1100]),
scored for the presence of any of 124 literary-cliche markers:
| Responses containing slop | KL divergence from base | |
|---|---|---|
| Base LFM3-1.7B | 71 / 100 | 0 (by definition) |
| This model | 23 / 100 | 0.2472 |
KL is measured on the next-token distribution over the same prompt set, in nats. 0.2472 corresponds to a ~28% increase in predictive dispersion โ a deliberate, bounded drift, not a different model.
Method
Heretic captures each abliterable matrix's input/output pairs over 500 "good" and 500 "bad"
prompt variants โ the same writing prompts with avoid cliches and use cliches extensively
instructions โ then fits a rank-50 LoRA (W + BยทA) per matrix with L-BFGS so that bad-prompt
activations move toward the good-prompt outputs while good-prompt outputs stay put.
LFM3 is a tri-hybrid, so three module families were modified:
attn.o_proj 24 modules (11 self_attn.o_proj + 13 conv.out_proj)
mlp.down_proj 24 modules (feed_forward.w2)
Selected trial (Pareto front index 3 of 9):
start_layer_index = 7
end_layer_index = 21
preserve_good_behavior_weight = 0.6028
steer_bad_behavior_weight = 0.0151
overcorrect_relative_weight = 0.5508
neighbor_count = 10
lora_rank = 50
Search: 12 trials (4 random-start, 8 TPE), 5 h 59 m on an Apple M1 (8 GB unified memory, MPS, bfloat16), batch size 2. Full Pareto front, 81 โ 0 slop at KL 0.0009 โ 7.94: the aggressive end of the front is degenerate (KL โ 8 with 0โ7 slop); this build is the low-KL/meaningful-reduction point.
Files
| File | Size | Use |
|---|---|---|
LFM3-1.7B-noslop-Q5_K_M.gguf |
~1.3 GB | llama.cpp, LM Studio, ollama |
LFM3-1.7B-noslop-Q8_0.gguf |
~1.9 GB | near-lossless reference |
| full bf16 weights | ~3.4 GB | transformers + trust_remote_code |
LFM3 ships custom modeling code (modeling_lfm3.py), so transformers requires
trust_remote_code=True.
Caveats
- KL is a damage proxy, not a quality metric. It measures drift from the base model at the first generated token over one prompt set. Long-range coherence, repetition and instruction-following damage are not captured โ evaluate on your own tasks.
- The 23% is a marker rate, not a sentence-level judgment. A response counts as slop if it contains any one of 124 listed phrases; the list is deliberately blunt.
- Not a safety tuning. This is a style modification. Base-model behavior, including refusal behavior, is largely unchanged.
- The adapter targets
o_proj/out_proj/w2across layers 7โ21 only; layers 0โ6 and 22โ23 are untouched.
License
Derived from LiquidAI/LFM3-1.7B and distributed under the same LFM Open License v1.0; see
the LICENSE file carried over from the base repository.
- Downloads last month
- 460