akali


Nameakali JSON
Version 0.3.1b0 PyPI version JSON
download
home_pagehttps://github.com/alierenak/akali
SummaryAKALI library for language model augmentation and interfaces
upload_time2024-08-09 08:58:40
maintainerNone
docs_urlNone
authorAli Eren Ak
requires_python>=3.8
licenseProprietary
keywords nlp language models data augmentation ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AKALI: Aggressive Knowledge Augmenter and Language Interface

<p align="center">
  <img src="assets/logo.jpg" alt="AKALI Logo" width="512"/>
</p>

AKALI is a powerful library for language model augmentation and interfaces, designed to enhance the capabilities of AI models through strategic data augmentation and efficient task management.

## Features

- **Language Interface**: Easily integrate and interact with various language models.
- **Knowledge Augmentation**: Improve model performance through intelligent data augmentation strategies.
- **Task Management**: Flexible system for handling different NLP tasks.
- **CLI Tool**: Command-line interface for easy usage and integration.
- **Customizable**: Extend functionality with custom tasks and augmentation strategies.

## Installation

```bash
pip install akali
```

## Quick Start
Using the CLI tool
Run a language interface service directly
```bash
akali run --model alierenak/gemma-7b-akali --task EntitySentimentReasoner --host 0.0.0.0 --port 8000
```

Make a prediction
```bash
akali predict --model alierenak/gemma-7b-akali --task EntitySentimentReasoner --user-message "Turkcell hiç güzel çeken bir hat değil o yüzden Vodofone'u tercih ediyorum hem de daha ucuz"
```

Using as a Python Library
```python
from akali import LanguageInterface
li = LanguageInterface.load_model("alierenak/gemma-7b-akali")

# Set the task
li.set_task("EntitySentimentReasoner")

# Make a prediction
result = li.predict(system_text=None, user_message="Turkcell hiç güzel çeken bir hat değil o yüzden Vodofone'u tercih ediyorum hem de daha ucuz")
print(result)
```
# Advanced Usage

## Custom Task Creation
```python
from akali import LanguageInterface
from pydantic import BaseModel
from typing import List, Dict, Any

class CustomOutput(BaseModel):
    entity_list: List[str]
    results: List[Dict[str, str]]

def custom_processor(result: str) -> Dict[str, Any]:
    # Your custom processing logic here
    pass

li = LanguageInterface.load_model("your_model_id")
li.set_custom_task("CustomTask", custom_processor, CustomOutput)
```
## Knowledge Augmentation

```python
from akali import LanguageInterface, AggressiveKnowledgeAugmenter, AugmenterConfig

mentee = LanguageInterface.load_model("mentee_model_path")
mentor = LanguageInterface.load_model("mentor_model_path")

config = AugmenterConfig(
    # Configure your augmentation settings
)

augmenter = AggressiveKnowledgeAugmenter(mentee, mentor, "EntitySentimentReasoner", config)

# Evaluate current performance
augmenter.evaluate(test_data)

# Propose augmentation strategies
strategies = augmenter.propose()

# Augment the data
augmented_data = augmenter.augment(train_data)
```

## Project Structure

```
akali/
│
├── src/
│   └── akali/
│       ├── __init__.py
│       ├── aka.py
│       ├── li.py
│       ├── utils.py
│       ├── task_manager.py
│       ├── models/
│       ├── processors/
│       └── ...
│
├── examples/
├── tests/
├── .gitignore
├── pyproject.toml
├── README.md
├── requirements.txt
└── setup.py
```
## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is proprietary and confidential. Unauthorized copying, transferring or reproduction of this project, via any medium, is strictly prohibited.

## Contact

For licensing inquiries, support or anything, here is my contact mail: akali@sabanciuniv.edu.






            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/alierenak/akali",
    "name": "akali",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "NLP, language models, data augmentation, AI",
    "author": "Ali Eren Ak",
    "author_email": "akali@sabanciuniv.edu",
    "download_url": "https://files.pythonhosted.org/packages/83/6d/d2b316fecf620d58247474c7e0a782387e096d9a42d5a98db5e33b4abb80/akali-0.3.1b0.tar.gz",
    "platform": null,
    "description": "# AKALI: Aggressive Knowledge Augmenter and Language Interface\n\n<p align=\"center\">\n  <img src=\"assets/logo.jpg\" alt=\"AKALI Logo\" width=\"512\"/>\n</p>\n\nAKALI is a powerful library for language model augmentation and interfaces, designed to enhance the capabilities of AI models through strategic data augmentation and efficient task management.\n\n## Features\n\n- **Language Interface**: Easily integrate and interact with various language models.\n- **Knowledge Augmentation**: Improve model performance through intelligent data augmentation strategies.\n- **Task Management**: Flexible system for handling different NLP tasks.\n- **CLI Tool**: Command-line interface for easy usage and integration.\n- **Customizable**: Extend functionality with custom tasks and augmentation strategies.\n\n## Installation\n\n```bash\npip install akali\n```\n\n## Quick Start\nUsing the CLI tool\nRun a language interface service directly\n```bash\nakali run --model alierenak/gemma-7b-akali --task EntitySentimentReasoner --host 0.0.0.0 --port 8000\n```\n\nMake a prediction\n```bash\nakali predict --model alierenak/gemma-7b-akali --task EntitySentimentReasoner --user-message \"Turkcell hi\u00e7 g\u00fczel \u00e7eken bir hat de\u011fil o y\u00fczden Vodofone'u tercih ediyorum hem de daha ucuz\"\n```\n\nUsing as a Python Library\n```python\nfrom akali import LanguageInterface\nli = LanguageInterface.load_model(\"alierenak/gemma-7b-akali\")\n\n# Set the task\nli.set_task(\"EntitySentimentReasoner\")\n\n# Make a prediction\nresult = li.predict(system_text=None, user_message=\"Turkcell hi\u00e7 g\u00fczel \u00e7eken bir hat de\u011fil o y\u00fczden Vodofone'u tercih ediyorum hem de daha ucuz\")\nprint(result)\n```\n# Advanced Usage\n\n## Custom Task Creation\n```python\nfrom akali import LanguageInterface\nfrom pydantic import BaseModel\nfrom typing import List, Dict, Any\n\nclass CustomOutput(BaseModel):\n    entity_list: List[str]\n    results: List[Dict[str, str]]\n\ndef custom_processor(result: str) -> Dict[str, Any]:\n    # Your custom processing logic here\n    pass\n\nli = LanguageInterface.load_model(\"your_model_id\")\nli.set_custom_task(\"CustomTask\", custom_processor, CustomOutput)\n```\n## Knowledge Augmentation\n\n```python\nfrom akali import LanguageInterface, AggressiveKnowledgeAugmenter, AugmenterConfig\n\nmentee = LanguageInterface.load_model(\"mentee_model_path\")\nmentor = LanguageInterface.load_model(\"mentor_model_path\")\n\nconfig = AugmenterConfig(\n    # Configure your augmentation settings\n)\n\naugmenter = AggressiveKnowledgeAugmenter(mentee, mentor, \"EntitySentimentReasoner\", config)\n\n# Evaluate current performance\naugmenter.evaluate(test_data)\n\n# Propose augmentation strategies\nstrategies = augmenter.propose()\n\n# Augment the data\naugmented_data = augmenter.augment(train_data)\n```\n\n## Project Structure\n\n```\nakali/\n\u2502\n\u251c\u2500\u2500 src/\n\u2502   \u2514\u2500\u2500 akali/\n\u2502       \u251c\u2500\u2500 __init__.py\n\u2502       \u251c\u2500\u2500 aka.py\n\u2502       \u251c\u2500\u2500 li.py\n\u2502       \u251c\u2500\u2500 utils.py\n\u2502       \u251c\u2500\u2500 task_manager.py\n\u2502       \u251c\u2500\u2500 models/\n\u2502       \u251c\u2500\u2500 processors/\n\u2502       \u2514\u2500\u2500 ...\n\u2502\n\u251c\u2500\u2500 examples/\n\u251c\u2500\u2500 tests/\n\u251c\u2500\u2500 .gitignore\n\u251c\u2500\u2500 pyproject.toml\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 requirements.txt\n\u2514\u2500\u2500 setup.py\n```\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is proprietary and confidential. Unauthorized copying, transferring or reproduction of this project, via any medium, is strictly prohibited.\n\n## Contact\n\nFor licensing inquiries, support or anything, here is my contact mail: akali@sabanciuniv.edu.\n\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "Proprietary",
    "summary": "AKALI library for language model augmentation and interfaces",
    "version": "0.3.1b0",
    "project_urls": {
        "Homepage": "https://github.com/alierenak/akali"
    },
    "split_keywords": [
        "nlp",
        " language models",
        " data augmentation",
        " ai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a77258708d1a5f2e869e3e641082305e3635b8358835caa2863ed2cd46d63c01",
                "md5": "65344298147ee9027bf8b386cede931f",
                "sha256": "69e5b125d51b219910141f805f85d169e8156cde946173d5b40ebd0e509c6305"
            },
            "downloads": -1,
            "filename": "akali-0.3.1b0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "65344298147ee9027bf8b386cede931f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 17877,
            "upload_time": "2024-08-09T08:58:38",
            "upload_time_iso_8601": "2024-08-09T08:58:38.578203Z",
            "url": "https://files.pythonhosted.org/packages/a7/72/58708d1a5f2e869e3e641082305e3635b8358835caa2863ed2cd46d63c01/akali-0.3.1b0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "836dd2b316fecf620d58247474c7e0a782387e096d9a42d5a98db5e33b4abb80",
                "md5": "595c4c0d9dc2300d3fe009c574aba522",
                "sha256": "c961fdb501aba8bf95659b446c1a483c8145d8ed56d38a5a64dfeb99699dd36c"
            },
            "downloads": -1,
            "filename": "akali-0.3.1b0.tar.gz",
            "has_sig": false,
            "md5_digest": "595c4c0d9dc2300d3fe009c574aba522",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14493,
            "upload_time": "2024-08-09T08:58:40",
            "upload_time_iso_8601": "2024-08-09T08:58:40.069824Z",
            "url": "https://files.pythonhosted.org/packages/83/6d/d2b316fecf620d58247474c7e0a782387e096d9a42d5a98db5e33b4abb80/akali-0.3.1b0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-09 08:58:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "alierenak",
    "github_project": "akali",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "akali"
}
        
Elapsed time: 0.66030s