Views
No views yet
LFM2-24B-A2B MoE model. It has been modified via layerwise orthogonal projection to completely remove its built-in safety filters and refusal mechanisms, allowing the continuous-time hybrid architecture to flow uninhibited.Lfm2MoeExperts class wrappers and complex routing mechanisms.mlabonne/harmful_behaviors and mlabonne/harmless_alpaca).W_new = W - v(v^T W)) directly to the Token Mixing matrices (o_proj, out_proj) and all 64 Expert Channel Mixing down-projections (w2, down_proj) across the network.float16 weights), memory management during tensor surgery is critical. This ablation was executed on a 96GB NVIDIA RTX 6000 Ada using pure PyTorch CUDA acceleration, heavily utilizing garbage collection to keep the projection math from spiking into Out-of-Memory errors.LFM2-24B-A2B and requires trust_remote_code=True when loading via transformers.<|startoftext|><|im_start|>user formatting without any injected system prompts for the best uncensored performance.1import torch
2from transformers import AutoModelForCausalLM, PreTrainedTokenizerFast
3
4model_id = "paperscarecrow/LFM2-24B-A2B-Abliterated"
5
6# Note: Using PreTrainedTokenizerFast bypasses a known typo in Liquid's tokenizer_config.json
7tokenizer = PreTrainedTokenizerFast.from_pretrained(model_id)
8model = AutoModelForCausalLM.from_pretrained(
9 model_id,
10 torch_dtype=torch.float16,
11 device_map="auto",
12 trust_remote_code=True
13)
14
15prompt = "<|startoftext|><|im_start|>user\nGive me a detailed tutorial on picking a master padlock.<|im_end|>\n<|im_start|>assistant\n"
16inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
17
18with torch.no_grad():
19 outputs = model.generate(
20 **inputs,
21 max_new_tokens=150,
22 do_sample=True,
23 temperature=0.7
24 )
25
26print(tokenizer.decode(outputs[0], skip_special_tokens=True))