Instructions to use Aminrhmni/PersianAutomaticPunctuation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Aminrhmni/PersianAutomaticPunctuation with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Aminrhmni/PersianAutomaticPunctuation") model = AutoModelForSeq2SeqLM.from_pretrained("Aminrhmni/PersianAutomaticPunctuation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Adding `safetensors` variant of this model
This is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.b4d1806 -
Update README.md
779f6a7 -
Upload pytorch_model.bin
5482e38 -
Update README.md
2d90b23 -
Update README.md
8cade7d -
Update README.md
1b55c8a -
Upload 6 files
3ef18c9 -
Update README.md
0310dda -
Update README.md
b1d6579 -
Update README.md
c1d685f -
Update README.md
Hey there ***This model is intended for non-commercial use only. If you wish to use it for commercial purposes, please make sure to refer to this LinkedIn address. "Viravirast" is an editor based on transformer algorithms. By visiting the Viravirast.com, you can use a Persian semantic and structural text editor. usage from transformers import ( T5Tokenizer, MT5ForConditionalGeneration, Text2TextGenerationPipeline, ) path = "" pipe = Text2TextGenerationPipeline( model=MT5ForConditionalGeneration.from_pretrained(path), tokenizer=T5Tokenizer.from_pretrained(path), ) sentence = "ویراویراست یک نرم افزار ویرایش متن ساختاری و معنایی زبان فارسی است چیزی شبیه به گرامرلی در زبان انگلیسی" #res = pipe(sentence, max_length=100, num_beams=4) res = pipe(sentence, max_length=100) print(res[0]['generated_text']) n_epochs = 4 train_batch_size = 8 eval_batch_size = 4 lr = 5e-4 Training loss = 0.005501 Validation loss= 0.052046054affb -
initial commit
2fda366