Instructions to use Narsil/small_summarization_test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Narsil/small_summarization_test with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Narsil/small_summarization_test", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Narsil/small_summarization_test: direct link, hf CLI and curl.
- Browser
- Download file 518 Bytes
-
https://huggingface.co/Narsil/small_summarization_test/resolve/main/README.md
- Command line
-
hf download hf://Narsil/small_summarization_test/README.md
-
curl -L -o README.md https://huggingface.co/Narsil/small_summarization_test/resolve/main/README.md
518 Bytes
| ```python | |
| import tempfile | |
| from tokenizers import Tokenizer, models | |
| from transformers import PreTrainedTokenizerFast | |
| model_max_length = 4 | |
| vocab = [(chr(i), i) for i in range(256)] | |
| tokenizer = Tokenizer(models.Unigram(vocab)) | |
| with tempfile.NamedTemporaryFile() as f: | |
| tokenizer.save(f.name) | |
| real_tokenizer = PreTrainedTokenizerFast(tokenizer_file=f.name, model_max_length=model_max_length) | |
| real_tokenizer._tokenizer.save("dummy/tokenizer.json") | |
| ``` | |
| config uses Albert which works with a minimal `config.json` |