A template for python projects in PDM
Project description
transcoders-slim
Quickstart
Installation
pip install transcoders-slim
Usage
Load pre-trained transcoders from Jacob Dunefsky's repository: https://github.com/jacobdunefsky/transcoder_circuits
from transcoders.transcoder import Transcoder
from transcoders_slim.load_pretrained import load_pretrained
transcoders: dict[str, Transcoder] = load_pretrained()
for name, transcoder in transcoders.items():
print(name, transcoder)
Run a transcoder:
d_in = transcoder.d_in
d_tr = transcoder.d_sae
seq_len = 32
tr_in = torch.zeros(1, seq_len, d_in).to(transcoder.device)
tr_out, tr_hid = transcoder(tr_in)[:2]
Development
Refer to Setup for how to set up development environment.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
transcoders_slim-0.2.0.tar.gz
(62.7 kB
view hashes)
Built Distribution
Close
Hashes for transcoders_slim-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f6d4664821b2c575093ea2745d144b1967c140acb22138bbddbcfad80e7ccc5 |
|
MD5 | 76b8530e7c946ce68fe6f363765e8a6d |
|
BLAKE2b-256 | 27c0f1fc20c9b8dfc74ecd224d06727eb3c0df5cc263fbb48443600092fb010b |