prithivMLmods commited on
Commit
bb38946
·
verified ·
1 Parent(s): f730a78

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +109 -1
README.md CHANGED
@@ -7,4 +7,112 @@ datasets:
7
  - nohurry/Opus-4.6-Reasoning-3000x-filtered
8
  - Jackrong/Qwen3.5-reasoning-700x
9
  - Roman1111111/claude-opus-4.6-10000x
10
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  - nohurry/Opus-4.6-Reasoning-3000x-filtered
8
  - Jackrong/Qwen3.5-reasoning-700x
9
  - Roman1111111/claude-opus-4.6-10000x
10
+ ---
11
+
12
+ # **Q3.5-9B-Opus-DA**
13
+
14
+ > **Q3.5-9B-Opus-DA** (Qwen3.5 Distilled-Abliterated) is a reasoning-focused language model derived from **Qwen/Qwen3.5-27B**, compressed into a **9B parameter** architecture through multi-stage distillation.
15
+ > It is trained on **Opus reasoning traces** with abliteration, applying advanced refusal direction analysis and ablation-based strategies to reduce internal refusal behaviors while preserving strong reasoning capabilities.
16
+
17
+ > [!IMPORTANT]
18
+ > This model is intended strictly for research and learning purposes. Due to reduced internal refusal mechanisms, it may generate sensitive or unrestricted content. Users assume full responsibility for how the model is used. The authors and hosting platform disclaim any liability for generated outputs.
19
+
20
+ > [!NOTE]
21
+ > Note: This model is experimental and may generate artifacts.
22
+
23
+ ## **Key Highlights**
24
+
25
+ * **Multi-Stage Training on Opus Reasoning Traces**: Fine-tuned across multiple stages using high-quality reasoning traces from Claude Opus, enabling deep reasoning alignment.
26
+ * **Distilled Abliterated (DA)**: Applies advanced refusal direction analysis and ablation-based strategies to reduce internal refusal behaviors while preserving reasoning quality.
27
+ * **Qwen3.5 Base**: Built on the powerful **Qwen/Qwen3.5-27B** backbone for strong reasoning and generation performance.
28
+ * **Instruction + Reasoning Fusion**: Handles both instruction-following and complex multi-step reasoning tasks seamlessly.
29
+ * **High-Coherence Outputs**: Maintains consistency across long generations with improved contextual grounding.
30
+
31
+ ## **Datasets Used and Training Details**
32
+
33
+ | **Category** | **Details** |
34
+ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
35
+ | **Base Model** | [Qwen/Qwen3.5-27B](https://huggingface.co/Qwen/Qwen3.5-27B) |
36
+ | **Final Model Size** | 9B Parameters |
37
+ | **Training Type** | Multi-stage distillation + abliteration |
38
+ | **Objective** | Preserve reasoning quality from larger models; reduce refusal behaviors via ablation strategies; improve instruction-following reliability |
39
+ | **Reasoning Dataset 1** | [nohurry/Opus-4.6-Reasoning-3000x-filtered](https://huggingface.co/nohurry/Opus-4.6-Reasoning-3000x-filtered) |
40
+ | **Reasoning Dataset 2** | [Jackrong/Qwen3.5-reasoning-700x](https://huggingface.co/Jackrong/Qwen3.5-reasoning-700x) |
41
+ | **Reasoning Dataset 3** | [Roman1111111/claude-opus-4.6-10000x](https://huggingface.co/Roman1111111/claude-opus-4.6-10000x) |
42
+ | **Alignment / Evaluation Dataset** | [prithivMLmods/harm_bench](https://huggingface.co/prithivMLmods/harm_bench) |
43
+ | **Training Focus** | Structured reasoning, long-chain thinking, robustness across diverse prompts |
44
+ | **Training Inspiration 1** | [Jackrong-llm-finetuning-guide](https://github.com/R6410418/Jackrong-llm-finetuning-guide) |
45
+ | **Training Inspiration 2** | [Unsloth Documentation](https://unsloth.ai/docs/get-started/unsloth-notebooks) |
46
+
47
+ ## **Quick Start with Transformers**
48
+
49
+ ```bash
50
+ pip install transformers==5.7.0
51
+ # or latest
52
+ pip install git+https://github.com/huggingface/transformers.git
53
+ ```
54
+
55
+ ```python
56
+ from transformers import Qwen3_5ForConditionalGeneration, AutoProcessor
57
+ import torch
58
+
59
+ model = Qwen3_5ForConditionalGeneration.from_pretrained(
60
+ "prithivMLmods/Q3.5-9B-Opus-DA",
61
+ torch_dtype="auto",
62
+ device_map="auto"
63
+ )
64
+
65
+ processor = AutoProcessor.from_pretrained(
66
+ "prithivMLmods/Q3.5-9B-Opus-DA"
67
+ )
68
+
69
+ messages = [
70
+ {
71
+ "role": "user",
72
+ "content": [
73
+ {"type": "text", "text": "Generate a highly detailed caption of a futuristic city skyline at sunset."}
74
+ ],
75
+ }
76
+ ]
77
+
78
+ text = processor.apply_chat_template(
79
+ messages, tokenize=False, add_generation_prompt=True
80
+ )
81
+
82
+ inputs = processor(
83
+ text=[text],
84
+ padding=True,
85
+ return_tensors="pt"
86
+ ).to("cuda")
87
+
88
+ generated_ids = model.generate(**inputs, max_new_tokens=512)
89
+
90
+ generated_ids_trimmed = [
91
+ out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
92
+ ]
93
+
94
+ output_text = processor.batch_decode(
95
+ generated_ids_trimmed,
96
+ skip_special_tokens=True,
97
+ clean_up_tokenization_spaces=False
98
+ )
99
+
100
+ print(output_text)
101
+ ```
102
+
103
+ ## **Intended Use**
104
+
105
+ * **Reasoning & Chain-of-Thought Tasks**: Deep multi-step reasoning powered by Opus-distilled traces
106
+ * **Instruction Following**: Hybrid prompts requiring both instruction adherence and reasoning
107
+ * **Red-Teaming & Alignment Research**: Evaluating reduced-refusal systems and refusal direction analysis
108
+ * **Local High-Performance Deployment**: Multi-GPU or quantized inference setups
109
+ * **Research on Abliteration**: Studying the effects of ablation-based training on reasoning preservation
110
+
111
+ ## **Limitations & Risks**
112
+
113
+ > **Important Note**: This model intentionally minimizes built-in safety refusals.
114
+
115
+ * **Sensitive Content Risk**: May produce unrestricted or controversial outputs
116
+ * **User Responsibility**: Requires careful and ethical usage
117
+ * **High Compute Demand**: Large models need significant VRAM or optimized inference
118
+ * **Abliteration Trade-offs**: Reduced refusal may impact safety alignment and output filtering