DOM-aware tokenization for 🤗 Hugging Face language models
Project description
DOM tokenizers
DOM-aware tokenization 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]
Train a tokenizer
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.12.tar.gz
(69.2 kB
view hashes)
Built Distribution
Close
Hashes for dom_tokenizers-0.0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b046c21afb6b1cd0706dc12a23d4cb305fa5aa2d9118ef85d02351fb9b7bb961 |
|
MD5 | 876b504581c77bf3fa0212f171d71f93 |
|
BLAKE2b-256 | ff86efeeaa4cfdf468aa93da54ee4a8cb7677dc2782bafb07e94cb1d82d51cfc |