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
Metadata
Release files for neo-taker 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neo_taker-0.1.2.tar.gz | 244.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| neo_taker-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 538.6 kB
Release files / neo_taker-0.1.2.tar.gz
| Download URL | neo_taker-0.1.2.tar.gz |
|---|---|
| Size | 244.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2dac29ae0189b47914afbb5213da86eb0b2d388967e99695d0cf9e125887c663
|
|
BLAKE2b-256 checksum How to use checksums |
cf9a854472ec05e2052aaee9514dcbdb56ce25d499e65821aa6e23bbca802d23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|
Release files / neo_taker-0.1.2-py3-none-any.whl
| Download URL | neo_taker-0.1.2-py3-none-any.whl |
|---|---|
| Size | 294.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e7fbead3037ae29ae0498e12b6f6744ebfd23544a3f43f3500f8145a0b77d5b
|
|
BLAKE2b-256 checksum How to use checksums |
a6d72d40a77e9423b393b86b133628b0012747d9831285c6200cf17e44da97e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.5
|