Skip to main content

Consult the module API page at

https://engineering.purdue.edu/kak/distBabyGPT/babyGPT-1.1.4.html

for all information related to this module, including information related to the latest changes to the code. The page at the URL shown above lists all of the module functionality you can invoke in your own code.

Creating an instance of babyGPT:

        baby_gpt = babyGPT(
                            max_seq_length = max_seq_length,
                            batch_size = batch_size,
                            embedding_size = embedding_size,
                            num_basic_decoders = num_basic_decoders,
                            num_atten_heads = num_atten_heads,
                            optimizer_params = optimizer_params,
                            num_warmup_steps = num_warmup_steps,
                            masking = masking,
                            verify_text_corpus = False,
                            path_saved_model = {"decoder" : "./saved_decoder",
                                                "embedding_generator" : "./saved_embedding_generator",
                                               },
                          )

Since babyGPT calls on TransformerFG for language modeling, you must also construct an instance of that class:

        xformer = baby_gpt.TransformerFG(
                            max_seq_length = max_seq_length,
                            embedding_size = embedding_size,
                            tokenizer_json = tokenizer_json,
                            num_warmup_steps = num_warmup_steps,
                            optimizer_params = optimizer_params,
                  )

Within the TransformerFG module, it is the MasterDecoder class that is needed for the next token prediction for the purpose of self-supervised learning:

        master_decoder = baby_gpt.MasterDecoderWithMasking(
                            xformer,
                            num_basic_decoders = num_basic_decoders,
                            num_atten_heads = num_atten_heads,
                            masking = masking
                         )


Finally, here is an instance of the dataloader you're going to need:

        dataloader = baby_gpt.ArticleDatasetWithBufferedContext(
                            gpt = baby_gpt,
                            tokenizer_json = tokenizer_json,
                            context_window_size = context_window_size,
                            context_buffer_size = context_buffer_size,
                            articles_dir = articles_dir,
                     )

Metadata

Release files for babyGPT 1.1.4

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

Source distribution (sdist)

Source distribution for babyGPT 1.1.4
File Size Uploaded Provenance Actions
babygpt-1.1.4.tar.gz 1.0 MB Without provenance Details for babygpt-1.1.4.tar.gz

Release files / babygpt-1.1.4.tar.gz

Download URL babygpt-1.1.4.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
4627b4f4322b2d2899e1c2e2e932485a24d4619c7fce8142c4789c68e7b6bc5a
BLAKE2b-256 checksum
How to use checksums
5e5c2f1ee8eff42f1d92aa6469d0c6f8b14c60870e718ff3f05dcb8b6bae56ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for babyGPT 1.1.4

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