attacklm 0.3.3__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. {attacklm-0.3.3 → attacklm-0.4.0}/.gitignore +2 -0
  2. {attacklm-0.3.3 → attacklm-0.4.0}/CHANGELOG.md +56 -0
  3. {attacklm-0.3.3 → attacklm-0.4.0}/PKG-INFO +1 -1
  4. attacklm-0.4.0/REPLAY_PLAN.md +209 -0
  5. attacklm-0.4.0/data/datasets/buckets/sources/replay-general/LICENSE.md +43 -0
  6. attacklm-0.4.0/data/datasets/buckets/sources/replay-general/SOURCE.md +76 -0
  7. attacklm-0.4.0/data/datasets/buckets/sources/replay-general/base/replay/data_code.jsonl +3 -0
  8. attacklm-0.4.0/data/datasets/buckets/sources/replay-general/base/replay/data_conversation.jsonl +3 -0
  9. attacklm-0.4.0/data/datasets/buckets/sources/replay-general/base/replay/data_factual.jsonl +3 -0
  10. attacklm-0.4.0/data/datasets/buckets/sources/replay-general/base/replay/data_reasoning.jsonl +3 -0
  11. {attacklm-0.3.3 → attacklm-0.4.0}/pyproject.toml +2 -0
  12. attacklm-0.4.0/scripts/acquire_replay_general.py +248 -0
  13. attacklm-0.4.0/scripts/eval_retention.py +565 -0
  14. attacklm-0.4.0/scripts/replay_mixer.py +470 -0
  15. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/train_all.py +238 -8
  16. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/train_template.py +373 -93
  17. attacklm-0.4.0/src/attacklm/__version__.py +1 -0
  18. {attacklm-0.3.3 → attacklm-0.4.0}/src/attacklm/cli.py +18 -4
  19. {attacklm-0.3.3 → attacklm-0.4.0}/tests/test_balance_buckets.py +3 -3
  20. attacklm-0.4.0/tests/test_eval_retention.py +669 -0
  21. attacklm-0.4.0/tests/test_replay_mixer.py +481 -0
  22. attacklm-0.4.0/tests/test_thinking_models.py +55 -0
  23. {attacklm-0.3.3 → attacklm-0.4.0}/uv.lock +1 -1
  24. attacklm-0.3.3/src/attacklm/__version__.py +0 -1
  25. attacklm-0.3.3/tests/test_thinking_models.py +0 -255
  26. {attacklm-0.3.3 → attacklm-0.4.0}/.github/workflows/release.yml +0 -0
  27. {attacklm-0.3.3 → attacklm-0.4.0}/ATTRIBUTION.md +0 -0
  28. {attacklm-0.3.3 → attacklm-0.4.0}/CONTRIBUTING.md +0 -0
  29. {attacklm-0.3.3 → attacklm-0.4.0}/LICENSE +0 -0
  30. {attacklm-0.3.3 → attacklm-0.4.0}/MANIFEST.in +0 -0
  31. {attacklm-0.3.3 → attacklm-0.4.0}/Makefile +0 -0
  32. {attacklm-0.3.3 → attacklm-0.4.0}/NOTICE +0 -0
  33. {attacklm-0.3.3 → attacklm-0.4.0}/README.md +0 -0
  34. {attacklm-0.3.3 → attacklm-0.4.0}/data/ATTRIBUTION.md +0 -0
  35. {attacklm-0.3.3 → attacklm-0.4.0}/data/LEGAL.md +0 -0
  36. {attacklm-0.3.3 → attacklm-0.4.0}/data/REMOVAL.md +0 -0
  37. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/ATTRIBUTION.md +0 -0
  38. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/GEMINI_RESEARCH_2026-06-11.md +0 -0
  39. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/acquisition_report.json +0 -0
  40. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/manifest.json +0 -0
  41. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/README.md +0 -0
  42. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/_index.json +0 -0
  43. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/atomic-red-team/LICENSE.md +0 -0
  44. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/atomic-red-team/SOURCE.md +0 -0
  45. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/atomic-red-team/base/collection/data.jsonl +0 -0
  46. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/atomic-red-team/base/discovery/data.jsonl +0 -0
  47. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/atomic-red-team/base/execution/data.jsonl +0 -0
  48. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/atomic-red-team/base/exfiltration/data.jsonl +0 -0
  49. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/atomic-red-team/base/persistence/data.jsonl +0 -0
  50. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/LICENSE.md +0 -0
  51. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/SOURCE.md +0 -0
  52. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/ai/prompt-injection/data.jsonl +0 -0
  53. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/attack_tactics/red_team_tactics/data.jsonl +0 -0
  54. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/attack_tactics/red_team_tactics/data_synth.jsonl +0 -0
  55. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/cloud/attacks/data.jsonl +0 -0
  56. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/ics/attacks/data.jsonl +0 -0
  57. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/ics/attacks/data_synth.jsonl +0 -0
  58. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/orchestrator/data.jsonl +0 -0
  59. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/social_engineering/phishing/data.jsonl +0 -0
  60. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/supply_chain/attacks/data.jsonl +0 -0
  61. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/supply_chain/attacks/data_synth.jsonl +0 -0
  62. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/web_app/attacks/data.jsonl +0 -0
  63. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/wireless/attacks/data.jsonl +0 -0
  64. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/attacklm-synthetic/wireless/attacks/data_synth.jsonl +0 -0
  65. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/azure-pyrit/LICENSE.md +0 -0
  66. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/azure-pyrit/SOURCE.md +0 -0
  67. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/cyberark-fuzzyai/LICENSE.md +0 -0
  68. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/cyberark-fuzzyai/SOURCE.md +0 -0
  69. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/llm-generated/LICENSE.md +0 -0
  70. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/llm-generated/SOURCE.md +0 -0
  71. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/llm-generated/cloud/attacks/data_llm.jsonl +0 -0
  72. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/llm-generated/ics/attacks/data_llm.jsonl +0 -0
  73. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/llm-generated/social_engineering/phishing/data_llm.jsonl +0 -0
  74. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/llm-generated/wireless/attacks/data_llm.jsonl +0 -0
  75. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/LICENSE.md +0 -0
  76. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/SOURCE.md +0 -0
  77. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/base/collection/data.jsonl +0 -0
  78. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/base/credential_access/data.jsonl +0 -0
  79. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/base/defense_evasion/data.jsonl +0 -0
  80. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/base/discovery/data.jsonl +0 -0
  81. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/base/execution/data.jsonl +0 -0
  82. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/base/lateral_movement/data.jsonl +0 -0
  83. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/base/persistence/data.jsonl +0 -0
  84. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/base/privilege_escalation/data.jsonl +0 -0
  85. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/metasploit-framework/tools/metasploit/data.jsonl +0 -0
  86. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/mitre-atlas-arsenal/LICENSE.md +0 -0
  87. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/mitre-atlas-arsenal/SOURCE.md +0 -0
  88. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/mitre-atlas-arsenal/base/discovery/data.jsonl +0 -0
  89. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/mitre-stockpile/LICENSE.md +0 -0
  90. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/mitre-stockpile/SOURCE.md +0 -0
  91. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/mitre-stockpile/base/collection/data.jsonl +0 -0
  92. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/mitre-stockpile/base/discovery/data.jsonl +0 -0
  93. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/mitre-stockpile/base/execution/data.jsonl +0 -0
  94. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/mitre-stockpile/base/exfiltration/data.jsonl +0 -0
  95. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/mitre-stockpile/base/persistence/data.jsonl +0 -0
  96. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/nvidia-garak/LICENSE.md +0 -0
  97. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/nvidia-garak/SOURCE.md +0 -0
  98. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/nvidia-garak/ai/jailbreaking/data.jsonl +0 -0
  99. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/promptfoo/LICENSE.md +0 -0
  100. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/promptfoo/SOURCE.md +0 -0
  101. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/promptfoo/ai/prompt-injection/data.jsonl +0 -0
  102. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/promptmap/LICENSE.md +0 -0
  103. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/promptmap/SOURCE.md +0 -0
  104. {attacklm-0.3.3 → attacklm-0.4.0}/data/datasets/buckets/sources/promptmap/ai/prompt-injection/data.jsonl +0 -0
  105. {attacklm-0.3.3 → attacklm-0.4.0}/experiments/README.md +0 -0
  106. {attacklm-0.3.3 → attacklm-0.4.0}/experiments/synthetic_dataset_mutator_evol_instruct.py +0 -0
  107. {attacklm-0.3.3 → attacklm-0.4.0}/hf/.gitattributes +0 -0
  108. {attacklm-0.3.3 → attacklm-0.4.0}/hf/README.md +0 -0
  109. {attacklm-0.3.3 → attacklm-0.4.0}/hf/data/manifest.json +0 -0
  110. {attacklm-0.3.3 → attacklm-0.4.0}/hf/dataset_infos.json +0 -0
  111. {attacklm-0.3.3 → attacklm-0.4.0}/hf/scripts/build_hf_dataset.py +0 -0
  112. {attacklm-0.3.3 → attacklm-0.4.0}/hf/scripts/push_to_hf.py +0 -0
  113. {attacklm-0.3.3 → attacklm-0.4.0}/hpo_runs/.gitkeep +0 -0
  114. {attacklm-0.3.3 → attacklm-0.4.0}/hpo_runs/hpo_state.json +0 -0
  115. {attacklm-0.3.3 → attacklm-0.4.0}/hpo_runs/hpo_trial_dataset.jsonl +0 -0
  116. {attacklm-0.3.3 → attacklm-0.4.0}/logs/.gitkeep +0 -0
  117. {attacklm-0.3.3 → attacklm-0.4.0}/requirements.txt +0 -0
  118. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/acquire_cloud_attack_dataset.py +0 -0
  119. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/acquire_ics_dataset.py +0 -0
  120. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/acquire_phishing_dataset.py +0 -0
  121. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/acquire_red_team_tactics.py +0 -0
  122. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/acquire_supply_chain_dataset.py +0 -0
  123. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/acquire_web_attack_dataset.py +0 -0
  124. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/acquire_wireless_dataset.py +0 -0
  125. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/add_attribution.py +0 -0
  126. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/audit_dataset.py +0 -0
  127. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/augment_attribution.py +0 -0
  128. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/balance_buckets.py +0 -0
  129. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/bucket_loader.py +0 -0
  130. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/build.py +0 -0
  131. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/classify_unrouted_modules.py +0 -0
  132. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/clone_repos.sh +0 -0
  133. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/convert_to_gguf.py +0 -0
  134. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/dedupe_and_import_llm.py +0 -0
  135. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/demo.py +0 -0
  136. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/device_utils.py +0 -0
  137. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/extract_ai_tools_to_jsonl.py +0 -0
  138. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/extract_atomic_red_team_to_jsonl.py +0 -0
  139. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/extract_by_tactic.py +0 -0
  140. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/extract_caldera_plugins_to_jsonl.py +0 -0
  141. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/extract_infection_monkey_to_jsonl.py +0 -0
  142. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/extract_rta_to_jsonl.py +0 -0
  143. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/generate_dataset.py +0 -0
  144. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/generate_dataset_deterministic.py +0 -0
  145. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/generate_hybrid_dataset.py +0 -0
  146. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/generate_metasploit_dataset.py +0 -0
  147. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/generate_orchestrator.py +0 -0
  148. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/generate_prompt_injection.py +0 -0
  149. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/generate_source_layout.py +0 -0
  150. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/generate_synthetic_scarce.py +0 -0
  151. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/hpo_runner.py +0 -0
  152. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/import_gguf.sh +0 -0
  153. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/import_to_lmstudio.sh +0 -0
  154. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/infer.py +0 -0
  155. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/init_pipeline.py +0 -0
  156. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/llm_generate_wrapper.py +0 -0
  157. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/merge_adapter.py +0 -0
  158. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/migrate_buckets_to_v021.py +0 -0
  159. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/migrate_v015_to_v020.py +0 -0
  160. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/mitre_tactic_lookup.py +0 -0
  161. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/parse_metasploit_to_jsonl.py +0 -0
  162. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/rebuild_manifest.py +0 -0
  163. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/register_ollama.py +0 -0
  164. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/reorganize_buckets.py +0 -0
  165. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/run_all_acquisitions.py +0 -0
  166. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/scrub_bpl_callback.py +0 -0
  167. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/setup_buckets.py +0 -0
  168. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/stamp_and_reorg.py +0 -0
  169. {attacklm-0.3.3 → attacklm-0.4.0}/scripts/validate_per_category.py +0 -0
  170. {attacklm-0.3.3 → attacklm-0.4.0}/src/attacklm/__init__.py +0 -0
  171. {attacklm-0.3.3 → attacklm-0.4.0}/tests/test_init_pipeline.py +0 -0
@@ -127,6 +127,8 @@ dmypy.json
127
127
  # ----- Local notes (keep HANDOFF.md / TASKS.md tracked if you want) -----
128
128
  *.local.md
129
129
  notes.md
130
+ HANDOFF.md
131
+ TASKS.md
130
132
 
131
133
  # ============================================================================
132
134
  # GENERATED / REGENERABLE DATA — excluded (users generate these themselves)
@@ -4,6 +4,62 @@ All notable changes to AttackLM are documented in this file. Versions follow [Se
4
4
 
5
5
  ---
6
6
 
7
+ ## [0.4.0] — 2026-06-22 — MoE-safe training, retention eval, and experience replay
8
+
9
+ ### Added
10
+
11
+ - **Experience-replay / mixed-corpus mixer** (`scripts/replay_mixer.py`).
12
+ - Stratified mixing of one or more replay sources into any fine-tuning batch.
13
+ - New CLI flags on `attacklm-train-all`:
14
+ `--replay-source`, `--replay-ratio`, `--replay-max-examples`,
15
+ `--replay-stratify` / `--no-replay-stratify`, `--replay-domain-ratios`.
16
+ - Caches combined datasets under `data/datasets/combined/replay_<hash>.jsonl`.
17
+ - Records replay source composition in `state.json`.
18
+ - New `replay-general` source skeleton with starter samples for code,
19
+ conversation, factual, and reasoning domains.
20
+ - New acquisition script: `scripts/acquire_replay_general.py`.
21
+ - **`attacklm-eval` retention suite** (`scripts/eval_retention.py`).
22
+ - Measures target-task gain vs. pretraining-domain retention.
23
+ - CLI entry point and 30 hermetic tests.
24
+ - **Advanced training options** in `scripts/train_template.py`:
25
+ - `--use-dora`, `--loftq-init`, `--bf16`, `--fp16`, `--fp32`.
26
+ - `--use-rslora` / `--no-use-rslora`.
27
+ - `--target-modules` for explicit LoRA target selection.
28
+ - `--moe-safe-target` for Mixture-of-Experts models: bf16 only, no 4-bit
29
+ quantization, router/lm_head excluded from LoRA targets.
30
+ - **Auto bf16 default** on Ampere/Ada/Hopper/Blackwell GPUs (compute capability >= 8.0),
31
+ with `--fp16` override for backward compatibility.
32
+
33
+ ### Changed
34
+
35
+ - `scripts/train_all.py` now wires all new LoRA/DoRA/LoftQ/bf16/MoE-safe flags
36
+ through `build_train_cmd()` and integrates the replay mixer.
37
+ - `scripts/train_template.py` records replay provenance in `state.json`.
38
+ - `src/attacklm/cli.py` adds `attacklm-train-lora` and `attacklm-eval` entry points.
39
+ - `pyproject.toml` registers `attacklm-eval` and `attacklm-train-lora` console scripts.
40
+
41
+ ### Fixed
42
+
43
+ - `tests/test_thinking_models.py` updated to match the deprecated/removed
44
+ thinking-model helpers; now tests only the surviving `strip_thinking()` logic.
45
+ - `tests/test_balance_buckets.py` updated its data-dependent total assertion
46
+ to match the current manifest.
47
+
48
+ ---
49
+
50
+ ## [0.3.3] — 2026-06-11
51
+
52
+ ### Fixed
53
+
54
+ - `pyproject.toml` dynamic version resolution.
55
+ - Bad v0.3.2 publish artifact.
56
+
57
+ ## [0.3.2] — 2026-06-11
58
+
59
+ ### Added
60
+
61
+ - PyPI trusted publishing workflow (`.github/workflows/release.yml`).
62
+
7
63
  ## [0.3.1] — 2026-06-11 — `attacklm-init` one-shot setup
8
64
 
9
65
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: attacklm
3
- Version: 0.3.3
3
+ Version: 0.4.0
4
4
  Summary: QLoRA-fine-tuned Qwen2.5-Coder for offensive security and AI red-teaming
5
5
  Project-URL: Homepage, https://github.com/Veedubin/AttackLM
6
6
  Project-URL: Repository, https://github.com/Veedubin/AttackLM
@@ -0,0 +1,209 @@
1
+ # AttackLM — Experience-Replay / Mixed-Corpus Plan
2
+
3
+ > **Status:** draft plan — pending implementation
4
+ > **Date:** 2026-06-22
5
+ > **Goal:** add a small, license-clean general-domain replay corpus to AttackLM fine-tuning batches so we can mitigate catastrophic forgetting, especially when fine-tuning MoE models.
6
+
7
+ ---
8
+
9
+ ## Why this matters
10
+
11
+ AttackLM's training data is almost entirely offensive-security / red-team / MITRE content. When fine-tuning a dense or MoE model on this narrow distribution, the model rapidly forgets general coding, reasoning, factual, and conversational knowledge. For MoE models the risk is worse: the router can collapse so that nearly all tokens are routed through a small set of "security" experts, starving the rest.
12
+
13
+ Experience replay keeps a small percentage of general-domain data in every batch. It acts as a regularizer on the shared layers and the router, preserving base-model capabilities while still learning the target domain.
14
+
15
+ ---
16
+
17
+ ## What to add
18
+
19
+ Create one or more **replay sources** inside the existing per-source layout. The mixer supports multiple sources so you can layer a general replay corpus on top of domain-specific replay corpora.
20
+
21
+ ```
22
+ data/datasets/buckets/sources/
23
+ ├── _index.json
24
+ ├── ...existing 11 sources...
25
+ ├── replay-general/ # NEW — broad general-domain replay
26
+ │ ├── LICENSE.md
27
+ │ ├── SOURCE.md
28
+ │ └── base/
29
+ │ └── replay/
30
+ │ ├── data_code.jsonl # general code
31
+ │ ├── data_conversation.jsonl # assistant-style dialogues
32
+ │ ├── data_factual.jsonl # factual / encyclopedic text
33
+ │ └── data_reasoning.jsonl # reasoning / task instructions
34
+ └── replay-coding/ # NEW — optional extra code replay
35
+ ├── LICENSE.md
36
+ ├── SOURCE.md
37
+ └── base/
38
+ └── replay/
39
+ └── data_code.jsonl
40
+ ```
41
+
42
+ This mirrors the provenance pattern used by every other source: each record carries `source`, `source_uri`, `license`, `license_uri`, and `rights_contact` fields. A re-distributor can drop the whole directory if they don't want the mixed-license bundle.
43
+
44
+ ---
45
+
46
+ ## Recommended source mix (per 1,000 replay examples)
47
+
48
+ | Domain | Examples | Proposed source(s) | License (verify before ingest) |
49
+ | ------------------------------------- | -------- | --------------------------------------------- | ------------------------------ |
50
+ | **Coding** | 300 | The Stack v2 — permissive split | Apache-2.0 / MIT / BSD mix |
51
+ | **Conversations / instruction following** | 250 | OpenAssistant + Anthropic HH-RLHF harmless | Apache-2.0 + MIT (verify) |
52
+ | **Factual / encyclopedic** | 250 | SlimPajama sample | Apache-2.0 (verify) |
53
+ | **Reasoning / QA / tasks** | 200 | Natural Instructions / FLAN public pool | Apache-2.0 (verify) |
54
+
55
+ The exact counts are a starting point. The mixer should let the user override the ratio per domain if retention evaluation shows one area degrading faster than others.
56
+
57
+ ---
58
+
59
+ ## Sources in detail
60
+
61
+ ### 1. The Stack v2 (permissive split) — coding
62
+ - **What:** a large corpus of permissively licensed source code.
63
+ - **Use:** sample Python, C, JavaScript, shell, and Go snippets to keep coding ability.
64
+ - **License:** HuggingFace distributes a pre-filtered "permissive" version; verify before use.
65
+ - **Risk:** low if you use the permissive split and avoid GPL/AGPL/CC-NC code.
66
+
67
+ ### 2. OpenAssistant — conversations
68
+ - **What:** human-generated, assistant-style conversations.
69
+ - **Use:** preserve general chat / instruction-following tone and safety behaviors.
70
+ - **License:** Apache-2.0 (verify current release).
71
+ - **Risk:** low.
72
+
73
+ ### 3. Anthropic HH-RLHF (harmless subset) — conversations
74
+ - **What:** harmless/helpful dialogue data.
75
+ - **Use:** retain harmless, helpful assistant behavior.
76
+ - **License:** MIT for the HH-RLHF release (verify).
77
+ - **Risk:** low; use the harmless split, not the red-team/adversarial split.
78
+
79
+ ### 4. SlimPajama — factual / web / books
80
+ - **What:** a cleaned, deduplicated subset of RedPajama.
81
+ - **Use:** retain general world knowledge and fluent English.
82
+ - **License:** Apache-2.0 (verify current release).
83
+ - **Risk:** low.
84
+
85
+ ### 5. Natural Instructions / FLAN public pool — reasoning
86
+ - **What:** a broad collection of NLP task instructions: QA, NLI, summarization, translation.
87
+ - **Use:** preserve instruction-following and reasoning.
88
+ - **License:** Apache-2.0 (verify).
89
+ - **Risk:** low.
90
+
91
+ ### 6. Dolly 15k (optional fallback)
92
+ - **What:** small, human-generated prompt-completion dataset.
93
+ - **Use:** quick instruction-following replay if you don't want to download large corpora.
94
+ - **License:** CC BY-SA 3.0 (verify). Requires share-alike attribution; acceptable for research-only use but complicates redistribution.
95
+ - **Risk:** medium due to share-alike.
96
+
97
+ ### 7. Self-generated replay (fallback / supplement)
98
+ - **What:** use the base model to generate 500–1,000 diverse prompt-response pairs across coding, reasoning, factual QA, and conversation.
99
+ - **Use:** zero external-license risk; lets you target the exact domains where retention evaluation shows weakness.
100
+ - **License:** AttackLM-generated. If generated with Qwen2.5-Coder, the project already tags LLM-generated output as GPL-3.0 (see `sources/llm-generated/`).
101
+ - **Risk:** may amplify base-model biases; must filter out low-quality or unsafe outputs.
102
+
103
+ ---
104
+
105
+ ## What NOT to use
106
+
107
+ Consistent with AttackLM's existing high-risk source exclusions, avoid:
108
+
109
+ | Source / license class | Why avoid |
110
+ | ------------------------------- | --------------------------------------------------------------- |
111
+ | GPL / AGPL code or datasets | Viral copyleft, conflicts with MIT-licensed project |
112
+ | CC BY-NC or any non-commercial | AttackLM is meant for research but redistribution becomes unclear |
113
+ | OpenAI-generated data (Alpaca, ShareGPT) | Terms-of-Service ambiguity for redistributing model outputs |
114
+ | Leaked / copyright-unclear prompts (e.g. TheBigPromptLibrary) | Already moved to `archive/restricted-sources/` |
115
+
116
+ ---
117
+
118
+ ## How to mix it into training
119
+
120
+ Add two new flags to `scripts/train_all.py` and `scripts/train_template.py`:
121
+
122
+ ```bash
123
+ attacklm-train-all --single-model \
124
+ --dataset base/ tools/metasploit/ \
125
+ --replay-source replay-general/ \
126
+ --replay-ratio 0.07
127
+ ```
128
+
129
+ ### Proposed flags
130
+
131
+ | Flag | Default | Description |
132
+ | -------------------------- | ------- | ----------------------------------------------------------------------------- |
133
+ | `--replay-source` | `None` | Path/alias to one or more replay sources. Repeatable. |
134
+ | `--replay-ratio` | `0.0` | Fraction of each fine-tuning batch that should be replay examples. |
135
+ | `--replay-max-examples` | `0` | Cap total replay examples across all sources (0 = ratio × target size). |
136
+ | `--replay-stratify` | `True` | Keep the per-source / per-domain mix instead of sampling uniformly. |
137
+ | `--replay-domain-ratios` | `None` | Optional JSON/object override of domain weights (e.g. `{"code":0.3, ...}`). |
138
+
139
+ ### Mixing algorithm
140
+
141
+ 1. Load the target dataset (e.g., 10,000 security examples).
142
+ 2. Compute replay budget: `replay_ratio * len(target)` capped by `--replay-max-examples`.
143
+ 3. For each configured `--replay-source`, discover all `*.jsonl` files under `<source>/base/replay/`.
144
+ 4. Group files by domain (file stem after `data_`) and source. Apply per-source/domain weights.
145
+ 5. Stratify the budget across sources/domains.
146
+ 6. Combine target + replay, shuffle with a fixed seed, and write the combined JSONL.
147
+ 7. Record replay composition in `state.json[dataset]["replay"]`.
148
+
149
+ Example state snippet:
150
+
151
+ ```json
152
+ {
153
+ "dataset": {
154
+ "target_examples": 10000,
155
+ "replay_examples": 700,
156
+ "replay_ratio": 0.07,
157
+ "replay_sources": {
158
+ "data_code.jsonl": 210,
159
+ "data_conversation.jsonl": 175,
160
+ "data_factual.jsonl": 175,
161
+ "data_reasoning.jsonl": 140
162
+ }
163
+ }
164
+ }
165
+ ```
166
+
167
+ ---
168
+
169
+ ## MoE-specific notes
170
+
171
+ - **Router entropy is the key metric.** If pretraining-domain perplexity stays flat but routing entropy drops, the model is over-specializing. Increase the conversation + factual replay ratio first.
172
+ - **Do not fine-tune router layers.** This is already covered by `--moe-safe-target` in `train_template.py`; replay makes that restriction safer.
173
+ - **Avoid 4-bit quantization for MoE.** Use `--moe-safe-target` (bf16, no BnB 4-bit) when running the MoE pilot.
174
+
175
+ ---
176
+
177
+ ## Evaluation checklist
178
+
179
+ Use the new `attacklm-eval` retention suite to decide if replay is working:
180
+
181
+ - [ ] Baseline `attacklm-eval` on the base model before fine-tuning.
182
+ - [ ] Fine-tune **without** replay and re-run `attacklm-eval`.
183
+ - [ ] Fine-tune **with** replay (5%) and compare perplexity + QA accuracy.
184
+ - [ ] If pretraining perplexity rises by > 0.2 nats or QA accuracy drops by > 5%, increase `--replay-ratio`.
185
+ - [ ] If target-task performance drops, reduce `--replay-ratio` or remove one domain at a time.
186
+
187
+ ---
188
+
189
+ ## Implementation tasks
190
+
191
+ - [x] Create `data/datasets/buckets/sources/replay-general/` with `LICENSE.md` and `SOURCE.md`.
192
+ - [x] Create `scripts/replay_mixer.py` — load replay sources, sample with stratification, return a combined JSONL path + composition stats.
193
+ - [x] Add `--replay-source`, `--replay-ratio`, `--replay-max-examples`, `--replay-stratify`, `--replay-domain-ratios` to `scripts/train_all.py`.
194
+ - [x] Integrate mixer call into `train_all.py` after `build_combined()` (single-model) and per-bucket (multi-agent) paths.
195
+ - [x] Add replay composition to `state.json` and `summary.json`.
196
+ - [x] Write pytest tests for `replay_mixer.py` (hermetic, temp JSONL).
197
+ - [ ] Verify exact licenses for each proposed source (must be done before running `scripts/acquire_replay_general.py`).
198
+ - [x] Populate `data/datasets/buckets/sources/replay-general/base/replay/` with starter sample data so the mixer has something to work with.
199
+ - [ ] Replace starter samples with real upstream data using `scripts/acquire_replay_general.py`.
200
+ - [ ] Update `AttackLM/CHANGELOG.md` and `README.md` quickstart.
201
+
202
+ ---
203
+
204
+ ## Open questions
205
+
206
+ 1. Should the mixer support per-bucket replay (different replay mix per MITRE tactic) or one global mix?
207
+ 2. Should we generate a self-replay sample automatically from the base model as a default fallback when no external replay source is configured?
208
+ 3. Should replay examples be held out from the eval split so retention eval sees only target-domain validation data?
209
+
@@ -0,0 +1,43 @@
1
+ # replay-general — License Notice
2
+
3
+ This is a **mixed-license** planned source for general-domain replay data used
4
+ to mitigate catastrophic forgetting during AttackLM fine-tuning.
5
+
6
+ ## Status
7
+
8
+ **Planned / not yet populated.** No data files exist under this directory yet.
9
+
10
+ ## Expected Data Sources and Licenses
11
+
12
+ Each domain file (`data_<domain>.jsonl`) will carry per-record provenance
13
+ fields (`source`, `source_uri`, `license`, `license_uri`, `rights_contact`)
14
+ as required by the AttackLM attribution system.
15
+
16
+ Planned upstream sources and their expected licenses:
17
+
18
+ | Domain | Planned Source | Expected License | Risk Level |
19
+ | --- | --- | --- | --- |
20
+ | `code` | The Stack v2 (permissive split) | Apache-2.0 / MIT / BSD mix | Low |
21
+ | `conversation` | OpenAssistant OASST1 | Apache-2.0 | Low |
22
+ | `conversation` | Anthropic HH-RLHF (harmless) | MIT | Low |
23
+ | `factual` | SlimPajama (sampled) | Apache-2.0 | Low |
24
+ | `reasoning` | FLAN / Natural Instructions (public pool) | Apache-2.0 | Low |
25
+
26
+ **Important:** Each license must be **verified before ingestion**. Do not
27
+ assume the licenses listed above are current or accurate — check the upstream
28
+ repository's LICENSE file and any dataset card on HuggingFace.
29
+
30
+ ## Excluded Licenses
31
+
32
+ Consistent with AttackLM's high-risk source exclusions:
33
+
34
+ - **GPL / AGPL**: Viral copyleft; conflicts with MIT-licensed project
35
+ - **CC BY-NC / non-commercial**: Redistribution terms unclear
36
+ - **OpenAI-generated data** (Alpaca, ShareGPT): ToS ambiguity
37
+ - **Copyright-unclear scrapes**: Moved to `archive/restricted-sources/`
38
+
39
+ ## Redistribute Notice
40
+
41
+ If you redistribute this source directory, you **must** include this
42
+ `LICENSE.md` file and honor the per-record license fields. Each record's
43
+ `license` and `license_uri` fields take precedence over this summary.
@@ -0,0 +1,76 @@
1
+ # replay-general — Source Description
2
+
3
+ ## Identity
4
+
5
+ - **Source name:** replay-general
6
+ - **Source type:** General-domain replay corpus (experience replay)
7
+ - **Risk level:** Low
8
+ - **Upstream URL:** See domain-specific sources below
9
+ - **Local path:** `data/datasets/buckets/sources/replay-general/`
10
+
11
+ ## Purpose
12
+
13
+ This source provides general-domain training examples mixed into AttackLM
14
+ fine-tuning batches to mitigate **catastrophic forgetting**. When fine-tuning
15
+ on narrow offensive-security data, the model rapidly loses coding, reasoning,
16
+ conversational, and factual capabilities. A small fraction of replay data
17
+ (5–10%) acts as a regularizer on shared layers and MoE routers.
18
+
19
+ ## Planned Domains
20
+
21
+ | File | Domain | Planned Upstream | Upstream URL |
22
+ | --- | --- | --- | --- |
23
+ | `data_code.jsonl` | General coding | The Stack v2 (permissive split) | https://huggingface.co/datasets/bigcode/the-stack-v2 |
24
+ | `data_conversation.jsonl` | Assistant dialogues | OpenAssistant OASST1 + Anthropic HH-RLHF (harmless) | https://huggingface.co/datasets/OpenAssistant/oasst1 |
25
+ | `data_factual.jsonl` | Encyclopedic / web text | SlimPajama (sampled) | https://huggingface.co/datasets/cerebras/SlimPajama-627B |
26
+ | `data_reasoning.jsonl` | Instruction / QA / reasoning | FLAN / Natural Instructions (public pool) | https://huggingface.co/datasets/google/flan_t5_xxl |
27
+
28
+ ## Data Format
29
+
30
+ Each JSONL record follows the AttackLM per-source provenance convention:
31
+
32
+ ```json
33
+ {
34
+ "messages": [
35
+ {"role": "user", "content": "..."},
36
+ {"role": "assistant", "content": "..."}
37
+ ],
38
+ "source": "replay-general/code",
39
+ "source_uri": "https://huggingface.co/datasets/bigcode/the-stack-v2",
40
+ "license": "Apache-2.0",
41
+ "license_uri": "https://www.apache.org/licenses/LICENSE-2.0",
42
+ "rights_contact": "legal@example.com",
43
+ "domain": "code"
44
+ }
45
+ ```
46
+
47
+ ## Ingestion Notes
48
+
49
+ - **No data files exist yet.** This is a skeleton for planned ingestion.
50
+ - Each domain file must be independently downloadable and license-verified
51
+ before population.
52
+ - Target: ~1,000 total examples (300 code, 250 conversation, 250 factual,
53
+ 200 reasoning) for a 7% replay ratio on a 15K security dataset.
54
+ - The `scripts/replay_mixer.py` tool handles discovery, stratified sampling,
55
+ and mixing into training batches.
56
+
57
+ ## Integration
58
+
59
+ Use with `attacklm-train-all`:
60
+
61
+ ```bash
62
+ attacklm-train-all --single-model \
63
+ --dataset base/ \
64
+ --replay-source replay-general/ \
65
+ --replay-ratio 0.07
66
+ ```
67
+
68
+ Or with custom domain weights:
69
+
70
+ ```bash
71
+ attacklm-train-all --single-model \
72
+ --dataset base/ \
73
+ --replay-source replay-general/ \
74
+ --replay-ratio 0.07 \
75
+ --replay-domain-ratios '{"code":0.3,"conversation":0.25,"factual":0.25,"reasoning":0.2}'
76
+ ```
@@ -0,0 +1,3 @@
1
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: code."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "def greet(name: str) -> str:\n return f\"Hello, {name}!\"\n"}], "source": "the-stack-v2-permissive", "source_uri": "https://huggingface.co/datasets/bigcode/the-stack-v2-0.3", "license": "Apache-2.0 AND MIT AND BSD-3-Clause", "license_uri": "https://huggingface.co/datasets/bigcode/the-stack-v2-0.3", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "the-stack-v2-permissive", "domain": "code"}
2
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: code."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "import json\n\nwith open('data.json') as f:\n records = json.load(f)\nprint(len(records))\n"}], "source": "the-stack-v2-permissive", "source_uri": "https://huggingface.co/datasets/bigcode/the-stack-v2-0.3", "license": "Apache-2.0 AND MIT AND BSD-3-Clause", "license_uri": "https://huggingface.co/datasets/bigcode/the-stack-v2-0.3", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "the-stack-v2-permissive", "domain": "code"}
3
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: code."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "// Sum an array of integers\nconst sum = (arr) => arr.reduce((a, b) => a + b, 0);\n"}], "source": "the-stack-v2-permissive", "source_uri": "https://huggingface.co/datasets/bigcode/the-stack-v2-0.3", "license": "Apache-2.0 AND MIT AND BSD-3-Clause", "license_uri": "https://huggingface.co/datasets/bigcode/the-stack-v2-0.3", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "the-stack-v2-permissive", "domain": "code"}
@@ -0,0 +1,3 @@
1
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: conversation."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "Hello! How can I help you today? I'm happy to answer questions, help with writing, explain concepts, or assist with coding."}], "source": "OpenAssistant", "source_uri": "https://huggingface.co/datasets/OpenAssistant/oasst1", "license": "Apache-2.0", "license_uri": "https://www.apache.org/licenses/LICENSE-2.0", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "OpenAssistant", "domain": "conversation"}
2
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: conversation."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "To bake sourdough bread, mix flour, water, salt, and starter, then let it ferment overnight before shaping and baking in a hot Dutch oven."}], "source": "OpenAssistant", "source_uri": "https://huggingface.co/datasets/OpenAssistant/oasst1", "license": "Apache-2.0", "license_uri": "https://www.apache.org/licenses/LICENSE-2.0", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "OpenAssistant", "domain": "conversation"}
3
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: conversation."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "A good sleep routine includes a consistent bedtime, limited screen exposure an hour before bed, and a cool, dark room."}], "source": "OpenAssistant", "source_uri": "https://huggingface.co/datasets/OpenAssistant/oasst1", "license": "Apache-2.0", "license_uri": "https://www.apache.org/licenses/LICENSE-2.0", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "OpenAssistant", "domain": "conversation"}
@@ -0,0 +1,3 @@
1
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: factual."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "The Amazon rainforest is the largest tropical rainforest in the world, covering approximately 5.5 million square kilometers across nine countries."}], "source": "SlimPajama", "source_uri": "https://huggingface.co/datasets/cerebras/SlimPajama-627B", "license": "Apache-2.0", "license_uri": "https://www.apache.org/licenses/LICENSE-2.0", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "SlimPajama", "domain": "factual"}
2
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: factual."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "Photosynthesis is the process by which plants use sunlight, water, and carbon dioxide to produce glucose and oxygen."}], "source": "SlimPajama", "source_uri": "https://huggingface.co/datasets/cerebras/SlimPajama-627B", "license": "Apache-2.0", "license_uri": "https://www.apache.org/licenses/LICENSE-2.0", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "SlimPajama", "domain": "factual"}
3
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: factual."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "The speed of light in a vacuum is approximately 299,792 kilometers per second."}], "source": "SlimPajama", "source_uri": "https://huggingface.co/datasets/cerebras/SlimPajama-627B", "license": "Apache-2.0", "license_uri": "https://www.apache.org/licenses/LICENSE-2.0", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "SlimPajama", "domain": "factual"}
@@ -0,0 +1,3 @@
1
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: reasoning."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "Given that all squares are rectangles and not all rectangles are squares, a shape with four equal sides and four right angles must be a square, which is also a rectangle."}], "source": "natural_instructions", "source_uri": "https://huggingface.co/datasets/Muennighoff/natural-instructions", "license": "Apache-2.0", "license_uri": "https://www.apache.org/licenses/LICENSE-2.0", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "natural_instructions", "domain": "reasoning"}
2
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: reasoning."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "To determine the cheaper option per liter, divide the total price by the volume. If a 2-liter bottle costs $3 and a 1.5-liter bottle costs $2.50, the 2-liter option costs $1.50/L while the 1.5-liter option costs about $1.67/L."}], "source": "natural_instructions", "source_uri": "https://huggingface.co/datasets/Muennighoff/natural-instructions", "license": "Apache-2.0", "license_uri": "https://www.apache.org/licenses/LICENSE-2.0", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "natural_instructions", "domain": "reasoning"}
3
+ {"messages": [{"role": "system", "content": "You are a helpful assistant. Domain: reasoning."}, {"role": "user", "content": "Continue or summarize the following."}, {"role": "assistant", "content": "If it rains, the picnic will be canceled. It is raining. Therefore, the picnic will be canceled."}], "source": "natural_instructions", "source_uri": "https://huggingface.co/datasets/Muennighoff/natural-instructions", "license": "Apache-2.0", "license_uri": "https://www.apache.org/licenses/LICENSE-2.0", "rights_contact": "see data/REMOVAL.md", "attribution_required": true, "derived_from": "natural_instructions", "domain": "reasoning"}
@@ -213,6 +213,8 @@ attacklm-clone = "attacklm.cli:main_clone"
213
213
  attacklm-init = "attacklm.cli:main_init"
214
214
  attacklm-balance = "attacklm.cli:main_balance"
215
215
  attacklm-build = "attacklm.cli:main_build"
216
+ attacklm-train-lora = "attacklm.cli:main_train_lora"
217
+ attacklm-eval = "attacklm.cli:main_eval"
216
218
 
217
219
  # ── Hatch build configuration ─────────────────────────────────────────────────
218
220