Skip to main content

A template for python projects in PDM

Project description

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.

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 details)

Uploaded Source

Built Distribution

transcoders_slim-0.2.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file transcoders_slim-0.2.0.tar.gz.

File metadata

  • Download URL: transcoders_slim-0.2.0.tar.gz
  • Upload date:
  • Size: 62.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for transcoders_slim-0.2.0.tar.gz
Algorithm Hash digest
SHA256 72384a92b317d07fedeecedd989417691fa5fe89e5febe3f233565ce5e88c162
MD5 9038a47b7f4119463f910e180b00778d
BLAKE2b-256 8ada8d8d20bce18eb7ca4b4a9b7b88c5d35e0151805709c9256ebcbc685377a3

See more details on using hashes here.

File details

Details for the file transcoders_slim-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for transcoders_slim-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5f6d4664821b2c575093ea2745d144b1967c140acb22138bbddbcfad80e7ccc5
MD5 76b8530e7c946ce68fe6f363765e8a6d
BLAKE2b-256 27c0f1fc20c9b8dfc74ecd224d06727eb3c0df5cc263fbb48443600092fb010b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page