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.1.0.tar.gz
(62.6 kB
view details)
Built Distribution
File details
Details for the file transcoders_slim-0.1.0.tar.gz
.
File metadata
- Download URL: transcoders_slim-0.1.0.tar.gz
- Upload date:
- Size: 62.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6aea5b94a5f50d248790dc2914da4878b50fd907a6c160e8b7bd44f320aae8da |
|
MD5 | 35b94c28596ac869a6d2966a81d4e023 |
|
BLAKE2b-256 | 1e9cd549b4de622910b96a9b844ce51d2306750a9b06b58551cfb18e8199231d |
File details
Details for the file transcoders_slim-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: transcoders_slim-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95815d5328f117146a31a1e638b54330894bc2b3546a8332bc38248c734d03e8 |
|
MD5 | 5f173372cb9eab3874fda961327732d7 |
|
BLAKE2b-256 | 874e1a33b3ccbdaa21dc972f795681ace281faf6f3753670dabf9b86857e1f85 |