Skip to main content

A collection of different transformer-based RL agents.

Project description

alectors

alectors is a library providing transformer-based rl agents for nlp tasks, that is extremely customizable, but also comes with sane defaults.

source code: erga.apotheke.earth/aethrvmn/alectors

license: Source First License 1.1
learn more about sourcefirst here

Why "alectors"?

The word lector has deep roots in language and learning. Derived from the Latin legere ("to read"), it originally referred to someone who reads aloud—whether to an audience, to students, or in religious ceremonies. Throughout history, lectors played a vital role as intermediaries between text and audience. In medieval times, a lector was a scholar who interpreted sacred or philosophical texts. In cigar factories of the 19th century, lectors read newspapers and novels aloud to entertain workers, bridging knowledge and communication. Even today, in languages like Greek (λέκτορας), English (lecturer), French (lecteur), and Polish (lektor), the term retains its connection to reading and narration.

In many ways, an NLP agent is a modern lector; processing, interpreting, and generating language to make text more accessible, structured, and meaningful. Just as historical lectors gave voice to the written word, these agents bring understanding and coherence to natural language.

However, adding the prefix a- changes the word's meaning entirely. alector (ἀλέκτωρ) means "cock" (rooster) in Greek. I find the juxtaposition funny, hence the name.

Reasoning

Modern NLP solutions like GPTs and BERTs have made great strides in language processing and generation, however they come with serious limitations. As an example, even though a large language model can describe or make a game of chess, and even justify moves made, it is unable to play it, since there is no underlying mechanism for decision-making or reward incentives during training. Transformers rely on static token distributions without real-time feedback, limiting their capacity to actively learn.

alectors tries to address this gap by shifting the focus to active learning through reinforcement. An alector doesn’t just passively learn to generate language; it learns through interaction.

Supported Architectures

The currently supported architecture is PPO. Plans exist to include SAC, GRPO, and maybe DDQN.

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

alectors-1.0.1.post1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

alectors-1.0.1.post1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file alectors-1.0.1.post1.tar.gz.

File metadata

  • Download URL: alectors-1.0.1.post1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.13.2 Linux/6.13.5-200.fc41.x86_64

File hashes

Hashes for alectors-1.0.1.post1.tar.gz
Algorithm Hash digest
SHA256 9a96648d1e309a2d1fb84e6550a1d2595c386376fcaa44e7459cc05ffa19065c
MD5 a84a43973702a7033545c78bf2e9edd9
BLAKE2b-256 6b201ac7aac84529405194af425b1b4f3ccfe961bd37c8a55bf70c7ffeeca2b9

See more details on using hashes here.

File details

Details for the file alectors-1.0.1.post1-py3-none-any.whl.

File metadata

  • Download URL: alectors-1.0.1.post1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.13.2 Linux/6.13.5-200.fc41.x86_64

File hashes

Hashes for alectors-1.0.1.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 68c10e3b0d3511de01a9217e5ab90a7ed8c0f6af24013bb79d55e649e6d4d844
MD5 b88bc80a87e226637131f7a816b93185
BLAKE2b-256 1dc1cd72dc5591df03745bb8f45ffa6c6365c01fa32191e72482a958e5c94314

See more details on using hashes here.

Supported by

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