Skip to main content

Markov chain generator with rudimentary prompt response

Project description

Conversational Markov

LLMs don't normally sound like they're talking to you. The LLM in its most basic state simply continues the text it's given. LLMs sound like they're talking to you when they're set up to always complete one side of a conversation.

Technically, there's nothing stopping you from making a Markov chain generator do this, too. Train it on prompts and responses delineated by a sentinel token, and then, during inference, you can make the starting state any given prompt followed by the sentinel, and it will autocomplete something that sounds like a fitting response.

This project explores that.
Now, practically, there are reasons Markov chain generators are not typically used this way: state size increases linearly with every extra word you want to be able to prompt the MCG with, and model size correspondingly increases exponentially. With just a few words and a decent sized corpus, you'll be running out of memory trying to load the whole thing.

This project is a naïve example of a Markov chain generator set up to respond to prompts, using an off-the-shelf library. It uses a state size of 3, enough to allow it to process just the first and last word of a prompt plus the sentinel token.

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

conversational_markov-0.1.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

conversational_markov-0.1.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file conversational_markov-0.1.2.tar.gz.

File metadata

  • Download URL: conversational_markov-0.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for conversational_markov-0.1.2.tar.gz
Algorithm Hash digest
SHA256 06cbe773ed23d96eb800cd42b285176591713f673d57167b62eaba1d6304bf8d
MD5 2f463d37e884809f7789ed20343c4be3
BLAKE2b-256 77d9ce28181600ed4858f1ec93c355c302182f924bb586de90693ecc943f3940

See more details on using hashes here.

Provenance

The following attestation bundles were made for conversational_markov-0.1.2.tar.gz:

Publisher: python-publish.yml on garlic-os/conversational-markov

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file conversational_markov-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for conversational_markov-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4677885d7395fa91ff3bbd39677ea0cc67dbed681d161d14af5f2951b9418fee
MD5 11ba43d258c8daf64600b77d8b7cc542
BLAKE2b-256 45ff252eb34454cce8167a217dcca869c5670aa6549cf06b0560e2113eb93f4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for conversational_markov-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on garlic-os/conversational-markov

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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