New version of Taker (Transformer Activation taKER)
Project description
Transformer Activation taKER.
Minimal implementation of TransformerLens syntax with limited feature set, but allows using hooked HuggingFace models.
New model architectures must manually be mapped in ./component_maps/ but an LLM should be able to assist you if you don't already have access to it.
Additionally, some activations cannot be modified (eg: attention scores) because these do not have natural hook points in HuggingFace transformers. The current minimal implementation may have slightly unpredictable edits (eg: resid_mid only modifies inputs to mlp, the edits do not propagate.)
Example syntax:
from neo_taker import Model
m = Model(model_repo="nickypro/tinyllama-15m", model_device="cuda:0", dtype="bf16")
tokens = m.to_tokens("Hello world!")
print( m.list_activation_points() )
hook_fn_print_name = lambda act, hook: print(hook.name, act.shape)
with m.hooks(["blocks.0.hook_resid_post", hook_fn_print_name]):
logits = m(tokens, return_type="logits")
See development repo here: github.com/nickypro/neo-taker
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neo_taker-0.1.2.tar.gz.
File metadata
- Download URL: neo_taker-0.1.2.tar.gz
- Upload date:
- Size: 244.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dac29ae0189b47914afbb5213da86eb0b2d388967e99695d0cf9e125887c663
|
|
| MD5 |
69c33086dab0b4c5e64fecfda6077c96
|
|
| BLAKE2b-256 |
cf9a854472ec05e2052aaee9514dcbdb56ce25d499e65821aa6e23bbca802d23
|
File details
Details for the file neo_taker-0.1.2-py3-none-any.whl.
File metadata
- Download URL: neo_taker-0.1.2-py3-none-any.whl
- Upload date:
- Size: 294.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e7fbead3037ae29ae0498e12b6f6744ebfd23544a3f43f3500f8145a0b77d5b
|
|
| MD5 |
03601e52ae3eabf59ed68485d99e967e
|
|
| BLAKE2b-256 |
a6d72d40a77e9423b393b86b133628b0012747d9831285c6200cf17e44da97e7
|