Skip to main content

LLM Sampler

Install with:

pip install llm_sampler

Downloads PyPi version PyPI license

Read the Docs Badge

llm_sampler allows you to sample from any LLM by given logits.

It is a collection of various sampling techniques found online.

For now, the methods are:

  1. sample_huggingface - the one used in transformers
  2. sample_gpt_fast - the one used in gpt-fast

It also allows you get probability scores for sequences given by the user.

For example, if you supply the input: Input: The sentiment of the sentence 'I loved it' is

  • Option 0: positive
  • Option 1: negative
  • Option 2: unknown

This lib will help you create_batch_with_continuations

Metadata

Release files for llm-sampler 0.4.0

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

Source distribution (sdist)

Source distribution for llm-sampler 0.4.0
File Size Uploaded Provenance Actions
llm_sampler-0.4.0.tar.gz 5.0 kB Without provenance Details for llm_sampler-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llm-sampler 0.4.0
File Interpreter ABI Platform Actions
llm_sampler-0.4.0-py3-none-any.whl Python 3 none any Details for llm_sampler-0.4.0-py3-none-any.whl

Total release size: 9.6 kB

Release files / llm_sampler-0.4.0.tar.gz

Download URL llm_sampler-0.4.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dd3f789aa36b329e2bf9a52e77198dbd011f7628b8136e1362779a4ff1283931
BLAKE2b-256 checksum
How to use checksums
623f45c5c2b5d7241dd5f84bf27dc2351bc6c05eee40f0ed87c1faafe531a64d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / llm_sampler-0.4.0-py3-none-any.whl

Download URL llm_sampler-0.4.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b99d780695cfc1a58c807d3fc07d2f11726697ba06c25a8008d3972fc6c0342
BLAKE2b-256 checksum
How to use checksums
efc961ebef8a144e38007e22c0c286983a90c2dab0953df184f9e6f85d0220ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Security for llm-sampler 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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