Skip to main content

Wakong: An appropriate and robust masking algorithm for generating the training objective of text infilling.

Project description

Wakong

Wakong: An appropriate and robust masking algorithm for generating the training objective of text infilling

This project is the Python library of ARP 1: The Wakong Algorithm and Its Python Implementation.

This project is supported by Cloud TPUs from Google's TPU Research Cloud (TRC) as a part of my project on large-scale language model pre-training.

Installation

Wakong supports Python 3.10 and above:

pip install wakong

You can also install from source:

flit install

Usage

from wakong import Wakong
wakong = Wakong(seed=42)
sentence = 'I can eat glass , it does not hurt me .'.split(' ')
print(wakong(sentence))

Output:

['I', '<mask>', 'eat', 'glass', '<mask>', ',', 'it', 'does', 'not', 'hurt', 'me', '.']

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

wakong-1.1.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

wakong-1.1.1-py2.py3-none-any.whl (8.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file wakong-1.1.1.tar.gz.

File metadata

  • Download URL: wakong-1.1.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for wakong-1.1.1.tar.gz
Algorithm Hash digest
SHA256 08efd7274176160b4a1acd886197f1ae4cef576298e519d1bb1e39d5f3436e58
MD5 af0805a086c97ab3fd12e975554842e9
BLAKE2b-256 68f56e86e1209590cb90de1dc535d7003f8632e22cea42e82e4a54fa853a6af0

See more details on using hashes here.

File details

Details for the file wakong-1.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: wakong-1.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for wakong-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7d8b726b17302b14d70996cbc930756db0157ed2b4d59acac1af893719b326c1
MD5 e69a16903b2ee247432db4108dba1de1
BLAKE2b-256 5f053c2d36a8808e3d49e10310653c444cec0882abd49e9a05c29cb5047bfd20

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