DOM-aware tokenizers for 🤗 Hugging Face language models
Project description
DOM tokenizers
DOM-aware tokenizers for Hugging Face language models.
Installation
With PIP
pip install dom-tokenizers[train]
From sources
git clone https://github.com/gbenson/dom-tokenizers.git
cd dom-tokenizers
python3 -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
pip install -e .[dev,train]
Load a pretrained tokenizer from the Hub
Train your own
On the command line
Check everything's working using a small dataset of around 300 examples:
train-tokenizer gbenson/interesting-dom-snapshots
Train a tokenizer with a 10,000-token vocabulary using a dataset of 4,536 examples and upload it to the Hub:
train-tokenizer gbenson/webui-dom-snapshots -n 10000 -N 4536
huggingface-cli login
huggingface-cli upload dom-tokenizer-10k
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dom_tokenizers-0.0.4.tar.gz
(53.9 kB
view hashes)
Built Distribution
Close
Hashes for dom_tokenizers-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57b27bd8bf002be3a39350536bd5c3dc7ced08b6aecb49eabb8b4b4a41751f14 |
|
MD5 | 31cbdc3098f46163513284f4c2938271 |
|
BLAKE2b-256 | e76fd45f783755e9ffdfc53c730d0f3cfb169d44026745580979a0e97237155f |