Skip to main content

Blexus official package

Project description

🚀 Blexus

Welcome to Blexus, an AI innovation lab committed to crafting small, specialized AI models. Our mission is to unlock the full potential of AI through task-specific models that are fast, efficient, and highly customizable—ideal for developers, businesses, and everyday use cases. READ MORE


🛠️ Installation

You can install the Blexus package using pip. Run the following command:

pip install blexus

Use Quble models

from blexus import TextGenerator

# Example usage for quble models
if __name__ == "__main__":
    # Load your model here
    model_path = "Blexus/Quble_test_model_v1_INSTRUCT_v2"
    model = GPT2LMHeadModel.from_pretrained(model_path)

    # Initialize the TextGenerator with the model and specify whether to use GPU
    use_gpu = True  # Set to False if you want to use CPU
    generator = TextGenerator(model, use_gpu)

    # Define the prompt and generate text
    prompt = "hi"
    system = "You are a helpful intelligent Assistant."
    generated_texts = generator.quble_generate_text(prompt, system, max_length=250, num_return_sequences=1, temperature=0.7)

    print("\nGenerated Texts:")
    for idx, text in enumerate(generated_texts):
        print(f"Generated Text {idx + 1}: {text}")

    # Eject the model and clear resources
    generator.eject_model() # does not remove model files

Other (FCP models)

from blexus import TextGenerator

# Example usage for FCP models
if __name__ == "__main__":
    # Load your model here
    model_path = "Blexus/awareness_test" # example FCP model
    model = GPT2LMHeadModel.from_pretrained(model_path)

    # Initialize the TextGenerator with the model and specify whether to use GPU
    use_gpu = True  # Set to False if you want to use CPU
    generator = TextGenerator(model, use_gpu)

    # Define the prompt and generate text
    prompt = "hi"
    system = "NONE" # - use "NONE" to specify there is no system
    s1, s2, u1, u2, a1 = "<chain>", "<situation>", "<situation>", "</situation>", "<thought>" # example
          # - "<system>", "<endofsystem>", "<startofuser>", "<endofuser>", "<startofmodel>"
    generated_texts = generator.quble_generate_text(prompt, system, max_length=250, num_return_sequences=1, temperature=0.7)

    print("\nGenerated Texts:")
    for idx, text in enumerate(generated_texts):
        print(f"Generated Text {idx + 1}: {text}")

    # Eject the model and clear resources
    generator.eject_model() # does not remove model files

Other (FCP model example 2)

from blexus import TextGenerator

# Example 2 usage for FCP models
if __name__ == "__main__":
    # Load your model here
    model_path = "Blexus/icn_savant_v2_instruct" # example 2 FCP model
    model = GPT2LMHeadModel.from_pretrained(model_path)

    # Initialize the TextGenerator with the model and specify whether to use GPU
    use_gpu = True  # Set to False if you want to use CPU
    generator = TextGenerator(model, use_gpu)

    # Define the prompt and generate text
    prompt = "apple"
    system = "NONE" # - use "NONE" to specify there is no system
    s1, s2, u1, u2, a1 = "", "", "", "", "" # empty since we dont have for icn model
          # - "<system>", "<endofsystem>", "<startofuser>", "<endofuser>", "<startofmodel>"
    generated_texts = generator.quble_generate_text(prompt, system, max_length=250, num_return_sequences=1, temperature=0.7)

    print("\nGenerated Texts:")
    for idx, text in enumerate(generated_texts):
        print(f"Generated Text {idx + 1}: {text}")

    # Eject the model and clear resources
    generator.eject_model() # does not remove model files

More coming soon!

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

blexus-0.0.3.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.

blexus-0.0.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file blexus-0.0.3.tar.gz.

File metadata

  • Download URL: blexus-0.0.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for blexus-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2c41e4e7677e322ee371eae9bfb2d8bd2ff211db2f19fa2568023aee4d034544
MD5 22e84ae13b45c8321fa70f70c8990dbe
BLAKE2b-256 26939b62c4b071922baf62b376e82fc73d6cee6e685288e354b4ec9e0c33db7c

See more details on using hashes here.

File details

Details for the file blexus-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: blexus-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for blexus-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9a15d4070989c26420b71b69f4e6b45bac071addf8b35073a216507b51d8250f
MD5 f79ccdc8cfd5cc69a3c2c16bd60aecf2
BLAKE2b-256 ba88c774d0664e458cf7ffe1d5618c07a8eb0f2d9ed2eb23fd63cfad10350e08

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