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.1.tar.gz (62.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: transcoders_slim-0.2.1.tar.gz
  • Upload date:
  • Size: 62.8 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.1.tar.gz
Algorithm Hash digest
SHA256 15ef2b0329cafea52655418c63beee2d434a59c098f6033819d657a949536aeb
MD5 f6968b40825996cdbf6ae47bd89e6866
BLAKE2b-256 33db16164e182e84ca38d0fd90b5229799685c5bba009e3267d2d89f933ac7d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for transcoders_slim-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 549b92ea7ea6b8e73f649e6ee427b492b430aaafb30329e8cda9ffbb3ce27b94
MD5 4b38f1cafc96f69a43fada1275791b61
BLAKE2b-256 643aa4d757df95804cc928ab8ddd7d5ea8cc73e25c4a09aae3af054fe4413be5

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