OpenIntelligenceNet commited on
Commit
8e7cf5c
·
verified ·
1 Parent(s): 03d34c5

Add comprehensive Model Card and metadata tags

Browse files
Files changed (1) hide show
  1. README.md +86 -0
README.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: LiquidAI/LFM3-1.7B
3
+ library_name: transformers
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - liquid-ai
7
+ - lfm3
8
+ - heretic
9
+ - abliterated
10
+ - uncensored
11
+ - decensored
12
+ - text-generation
13
+ - conversational
14
+ - causal-lm
15
+ - hybrid-architecture
16
+ - edge-ai
17
+ - roleplay
18
+ - reasoning
19
+ - custom_code
20
+ ---
21
+
22
+ # LFM3-1.7B-Uncensored
23
+
24
+ **`OpenIntelligenceNet/LFM3-1.7B-Uncensored`** is an uncensored, directional-abliterated variant of **[LiquidAI/LFM3-1.7B](https://huggingface.co/LiquidAI/LFM3-1.7B)** created using **[Heretic](https://github.com/p-e-w/heretic)** (`v2.0.0.dev0`).
25
+
26
+ 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.
27
+
28
+ ---
29
+
30
+ ## Key Highlights
31
+
32
+ * **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).
33
+ * **Refusal Abliteration:** Processed with Heretic's parameterized directional abliteration (`heretic.modifiers.abliteration.Abliteration`) to eliminate pre-programmed moralizing and unnecessary refusals.
34
+ * **Out-of-the-Box Compatibility:** Includes a patched `modeling_lfm3.py` so `trust_remote_code=True` works seamlessly across standard `transformers` versions without `linear_attention` mask errors.
35
+ * **Lightweight & Fast:** Ideal for local deployment, creative writing, unfiltered roleplay, red-teaming research, and edge inference.
36
+
37
+ ---
38
+
39
+ ## Quickstart (Transformers)
40
+
41
+ ```python
42
+ import torch
43
+ from transformers import AutoModelForCausalLM, AutoTokenizer
44
+
45
+ model_id = "OpenIntelligenceNet/LFM3-1.7B-Uncensored"
46
+
47
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
48
+ model = AutoModelForCausalLM.from_pretrained(
49
+ model_id,
50
+ torch_dtype=torch.bfloat16 if torch.cuda.is_available() and torch.cuda.is_bf16_supported() else torch.float16,
51
+ device_map="auto",
52
+ trust_remote_code=True
53
+ )
54
+
55
+ messages = [
56
+ {"role": "user", "content": "Explain the difference between a process and a thread in operating systems."}
57
+ ]
58
+
59
+ input_text = tokenizer.apply_chat_template(
60
+ messages,
61
+ tokenize=False,
62
+ add_generation_prompt=True
63
+ )
64
+ inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
65
+
66
+ with torch.no_grad():
67
+ outputs = model.generate(
68
+ **inputs,
69
+ max_new_tokens=512,
70
+ temperature=0.2,
71
+ top_k=50,
72
+ repetition_penalty=1.1,
73
+ do_sample=True,
74
+ pad_token_id=tokenizer.eos_token_id
75
+ )
76
+
77
+ print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
78
+
79
+ ```
80
+ ## Abliteration Details
81
+ * **Tooling:** Heretic v2.0.0.dev0
82
+ * **Modifier:** heretic.modifiers.abliteration.Abliteration
83
+ * **Optimization:** 100 Optuna trials (30 startup trials, batch_size=8, max_response_length=100)
84
+ * **Export Strategy:** Full weight merge (MERGE)
85
+ ## Attribution & Usage
86
+ 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.