Skip to main content

A small example package

Project description

SuperBIG

SuperBIG is a virtual prompt/context management system. It can take long prompts that wouldn't otherwise fit into the context size limit of your model and optimally search for information and snippets that are relevant to a search string. The search results can then be injected back into the prompt, cutting down on token length and giving the model just enough information to produce a solid generation.

ELI5:

SuperBIG wraps your prompt in a searchable environment to simulate a virtual context of unlimited size - think of it like a swapfile or pagefile with a search engine on top

More info: https://github.com/oobabooga/text-generation-webui/pull/1548

A simplified version of this exists (superbooga) in the Text-Generation-WebUI, but this repo contains the full WIP project.

Note that SuperBIG is an experimental project, with the goal of giving local models the ability to give accurate answers using massive data sources.

Installation

pip install superbig

Usage

Import the PseudocontextProvider, and use it in your projects like so:

from superbig.provider import PseudocontextProvider

provider = PseudocontextProvider()
tokenizer = AutoTokenizer.from_pretrained(...)
model = AutoModelForCausalLM.from_pretrained(...)

...

new_prompt = provider.with_pseudocontext(prompt)

input_ids = tokenizer.tokenize(new_prompt)
model.generate(input_ids, **kwargs)

Milestones

  • PyPI package
  • Bugs fixed for general usage
  • Manually-added sources
  • Custom search logic that incorporates model output (Focus system)
  • Search result metadata
  • Dynamically shrinking search result pages

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

superbig-0.0.1.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

superbig-0.0.1-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file superbig-0.0.1.tar.gz.

File metadata

  • Download URL: superbig-0.0.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for superbig-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e60477a7630d428ae473329cecd35e6904a8fca909143c03167784fd7fd2a1c3
MD5 848e12b5d2316cfb93c10791d36739fc
BLAKE2b-256 0762d8b71638c9dda9b28bb5edde743f140b24ee28220a21b12afb2902e5bb68

See more details on using hashes here.

File details

Details for the file superbig-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: superbig-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for superbig-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 064ecd93d94237d17d2cf26c916bbb72c805bc4b94f50200bbd6a302b3980033
MD5 c355998bf2525a08ab3b811f5e11a71b
BLAKE2b-256 86b7f4113d0c9200cd17210c912ae1f2c42e8466d06d850f07b231614b468d09

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