Skip to main content

transcoders-slim

Github Actions Ruff pdm-managed Checked with pyright

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.

Metadata

Release files for transcoders-slim 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transcoders-slim 0.2.1
File Size Uploaded
transcoders_slim-0.2.1.tar.gz 62.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for transcoders-slim 0.2.1
File Interpreter ABI Platform
transcoders_slim-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 75.0 kB

Release files / transcoders_slim-0.2.1.tar.gz

Download URL transcoders_slim-0.2.1.tar.gz
Size 62.8 kB
Tags Source
SHA-256 checksum
How to use checksums
15ef2b0329cafea52655418c63beee2d434a59c098f6033819d657a949536aeb
BLAKE2b-256 checksum
How to use checksums
33db16164e182e84ca38d0fd90b5229799685c5bba009e3267d2d89f933ac7d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / transcoders_slim-0.2.1-py3-none-any.whl

Download URL transcoders_slim-0.2.1-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
549b92ea7ea6b8e73f649e6ee427b492b430aaafb30329e8cda9ffbb3ce27b94
BLAKE2b-256 checksum
How to use checksums
643aa4d757df95804cc928ab8ddd7d5ea8cc73e25c4a09aae3af054fe4413be5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page