File size: 7,222 Bytes
6a326d7
 
 
 
 
 
 
 
 
 
 
3de3988
 
 
9b4843f
43d5952
6a326d7
 
c07401f
 
 
 
 
 
 
 
 
 
1d26c54
8a43651
1d26c54
6a326d7
1d26c54
6a326d7
1d26c54
 
 
 
 
 
 
6a326d7
1d26c54
6a326d7
1d26c54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fd345c3
1d26c54
 
 
9b4843f
c07401f
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
inference: false
language:
- en
tags:
- activation-steering
- research
- pytorch
- cuda
---

<img src="affector-arc.png" width="160" alt="AFFECTOR-ARC app icon">


**Technical paper:** [PDF](https://huggingface.co/will-taggart/AFFECTOR-ARC/resolve/main/paper/AFFECTOR-ARC.pdf?download=true) · [LaTeX source](https://huggingface.co/will-taggart/AFFECTOR-ARC/blob/main/paper/AFFECTOR-ARC.tex) · [Complete source ZIP](https://huggingface.co/will-taggart/AFFECTOR-ARC/resolve/main/paper/AFFECTOR-ARC-source.zip?download=true) · [Markdown](https://huggingface.co/will-taggart/AFFECTOR-ARC/blob/main/paper/TECHNICAL_PAPER.md) · [Figures and source](paper/)

# AFFECTOR-ARC

**[Download AFFECTOR ARC 1.0.7 for macOS — Apple Silicon (.zip)](https://huggingface.co/will-taggart/AFFECTOR-ARC/resolve/main/macos/AFFECTOR-ARC-macOS15.zip?download=true)**

**Developer ID-signed and Apple-notarized · macOS 15+ · build 20261115 (November 15, 2026).**

Unzip, move **AFFECTOR ARC.app** into **Applications**, and open it. This is the native desktop client for Virginia Tech ARC; GPU inference runs on allocated ARC compute nodes. It requires your ARC account and SSH access. Model weights are obtained on ARC, separately from the desktop download.

This release fixes unreadable primary buttons in light and dark appearances, including inactive windows, and makes disabled states distinct. It includes source-text geometry generation and the ARC file browser/editor. Existing remote jobs are not changed by installing the desktop client.

[Apple release status](RELEASE_STATUS.md) · [Checksums](SHA256SUMS.txt) · [Desktop source](macos/AFFECTOR-ARC-Desktop-source.zip)

CUDA emotional-shape rewriting for Qwen3.5-0.8B on Virginia Tech ARC. This repository includes the engine source, command-line controls, setup script, and Slurm smoke test. Model weights are downloaded separately at the pinned revision.

## Rewrite a document

After [setup](README.txt), run inside a GPU allocation:

```bash
python run_arc.py --mode rewrite --text-file target.txt \
  --geometry shape.json --style Restrained \
  --strength 0.47 --budget 0.47 --inertia 0.2 \
  --temperature 0 --top-p 0.95 --top-k 40 \
  --output runs/rewrite.json
```

The geometry argument accepts an exported geometry or supported analysis JSON; omit it to use the default demonstration trajectory. Calibration is performed anew on CUDA. Output is saved incrementally to the JSON report and matching `.txt` file. Use a distinct output name for each run. This runner does not resume prior reports.

**November 13 update:** the engine is now bundled as a versioned source snapshot rather than fetched from an older GH commit. [ENGINE_MANIFEST.json](ENGINE_MANIFEST.json) records source hashes.

- **Minimal / Restrained / Balanced / Creative** prompts, with Restrained as the default.
- Sentence-aware chunks of up to approximately 700 characters.
- Original-length aim; 125% character ceiling within each original paragraph, carrying unused allowance forward within that paragraph only.
- Sentence-boundary stopping begins at 85% of the input chunk length. A token safety allowance expands as needed, to at most 2,048 tokens.
- Repetition and time limits stop runaway generation. Complete, nonrepetitive sentences are retained; raw returned drafts remain in the report. If no usable sentence exists, the original chunk is retained and flagged.
- A failed chunk does not stop later chunks. Requested strength/budget/inertia are never silently reduced or retried at lower values.

**Extreme values for strength, budget, and inertia may cause generation failures.** The runner also displays this warning in red in an ANSI-compatible terminal.

## Controls

| Control | Meaning / default |
|---|---|
| `--strength` | Scale of the activation displacement; 0.12 |
| `--budget` | Maximum displacement RMS relative to hidden-state RMS; 0.2 |
| `--inertia` | Previous displacement weight during generation; 0.2 |
| `--axis-top-k` | Number of emotional axes retained; 3 |
| `--axis-mass` | Cumulative emotional-axis magnitude retained; 1 |
| `--axis-temperature` | Emotional-axis magnitude exponent control; 1 |
| `--temperature` | Token sampling temperature; 0 (greedy) |
| `--top-p` | Token probability-mass cutoff; 0.95 |
| `--top-k` | Token candidate count; 40 |
| `--max-tokens` | Base token allowance; 512, expanded in rewrite mode |
| `--time-limit` | Per-generation time limit in seconds; 120 |

Activation controls use the imported geometry's settings unless explicitly overridden. Top-p and top-k are inactive at temperature 0; they do not control activation axes. Geometry coordinates are applied through hidden states, not inserted into the rewrite prompt. This CLI has no desktop fields or theme controls.

## CUDA checks

```bash
python run_arc.py --mode smoke --text-file passage.txt --output runs/smoke.json
# or:
sbatch --account=YOUR_ALLOCATION smoke.sbatch
```

Smoke mode remains the default for compatibility. Without explicit overrides it retains the original rewrite instruction, 128-token allowance, 600-second time limit, and original decoding options. The new repetition guards and document caps apply only to opt-in rewrite mode. It checks zero-strength greedy text/token equivalence, nonzero injections, normal hook restoration, restored baseline text, and disabled parameter gradients. Smoke mode intentionally does not apply document-length salvage, so these equivalence checks compare raw generations.

Seven CPU policy tests and Python/shell syntax checks passed for this update. The updated CUDA path has **not yet been run on an ARC GPU**. A prior version was reported by the author to pass on `tc-dgx005` on November 12, 2026; that does not validate this revision. Emotional effectiveness, semantic fidelity, and behavior at extreme settings are not guaranteed.

See [technical report](https://huggingface.co/will-taggart/AFFECTOR-ARC/blob/main/paper/TECHNICAL_PAPER.md) for a self-contained derivation of the steering mathematics, document workflow, controls, and validation limits. Engine licensing is preserved in [ATLAS_LICENSE](ATLAS_LICENSE); Qwen weights retain their upstream license. No weights are redistributed here.

## Desktop: generate geometry from source text

Open **03 Shape + weights → Generate from source text…**, load TXT, RTF or DOCX (or paste text), and choose **Generate on GPU**. Once the job completes, select it in **04 Jobs + results** and choose **Use generated shape**. Assessment failures and unknown directions are recorded in the report. Ratings from the small local model remain experimental.

For a fresh ARC installation, use **01 Connection** to download/update the HF source snapshot and complete GPU setup. Existing installations need the updated source snapshot to use geometry generation; update when ready, without interrupting already submitted jobs. The source update retains separate versioned releases and reuses an unchanged GPU environment.

The **05 ARC files** workspace browses remote directories and edits regular UTF-8 text files up to 1 MiB. Saving checks for conflicting changes and replaces the file atomically. Browsing and editing use SSH; model inference uses Slurm GPU jobs.