https://github.com/ai-forever/ru-prompts
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.9%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: ai-forever
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://ai-forever.github.io/ru-prompts
- Size: 796 KB
Statistics
- Stars: 58
- Watchers: 6
- Forks: 5
- Open Issues: 3
- Releases: 0
Metadata Files
README.md
ruPrompts
ruPrompts is a high-level yet extensible library for fast language model tuning via automatic prompt search, featuring integration with HuggingFace Hub, configuration system powered by Hydra, and command line interface.
Prompt is a text instruction for language model, like
Translate English to French:
cat =>
For some tasks the prompt is obvious, but for some it isn't. With ruPrompts you can define only the prompt format, like <P*10>{text}<P*10>, and train it automatically for any task, if you have a training dataset.
You can currently use ruPrompts for text-to-text tasks, such as summarization, detoxification, style transfer, etc., and for styled text generation, as a special case of text-to-text.
Features
- Modular structure for convenient extensibility
- Integration with HF Transformers, support for all models with LM head
- Integration with HF Hub for sharing and loading pretrained prompts
- CLI and configuration system powered by Hydra
- Pretrained prompts for ruGPT-3
Installation
ruPrompts can be installed with pip:
sh
pip install ruprompts[hydra]
See Installation for other installation options.
Usage
Loading a pretrained prompt for styled text generation:
```py
import ruprompts from transformers import pipeline
pplnjoke = pipeline("text-generation-with-prompt", prompt="konodyuk/promptrugpt3largejoke") pplnjoke("Говорит кружка ложке") [{"generated_text": 'Говорит кружка ложке: "Не бойся, не утонешь!".'}] ```
For text2text tasks:
```py
pplndetox = pipeline("text2text-generation-with-prompt", prompt="konodyuk/promptrugpt3largedetoxrusse") pplndetox("Опять эти тупые дятлы все испортили, чтоб их черти взяли") [{"generatedtext": 'Опять эти люди все испортили'}] ```
Proceed to Quick Start for a more detailed introduction or start using ruPrompts right now with our Colab Tutorials.
License
ruPrompts is Apache 2.0 licensed. See the LICENSE file for details.
Owner
- Name: AI Forever
- Login: ai-forever
- Kind: organization
- Location: Armenia
- Repositories: 60
- Profile: https://github.com/ai-forever
Creating ML for the future. AI projects you already know. We are non-profit organization with members from all over the world.
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 4
- Total pull requests: 1
- Average time to close issues: about 2 months
- Average time to close pull requests: about 7 hours
- Total issue authors: 3
- Total pull request authors: 1
- Average comments per issue: 1.25
- Average comments per pull request: 3.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Diyago (1)
- z00logist (1)
- BunnyNoBugs (1)
Pull Request Authors
- iamwavecut (2)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- black ^21.12b0 develop
- hypothesis ^6.31.3 develop
- isort ^5.10.1 develop
- mkdocs ^1.2.3 develop
- mkdocs-material ^8.1.0 develop
- mkdocs-simple-hooks ^0.1.3 develop
- mkdocstrings ^0.16.2 develop
- pytest ^6.2.5 develop
- pytest-cov ^3.0.0 develop
- datasets ^1.16.1
- hydra-core ^1.1.0
- python ^3.7
- torch ^1.10.0
- torchtyping ^0.1.4
- transformers ^4.6.0
- typeguard ^2.13.3
- typing-extensions ^4.0.1
- actions/checkout v2 composite
- actions/setup-python v2 composite