Instructions to use VoidZeroe/ChatDEIP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use VoidZeroe/ChatDEIP with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-13b-chat-hf") model = PeftModel.from_pretrained(base_model, "VoidZeroe/ChatDEIP") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from VoidZeroe/ChatDEIP: direct link, hf CLI and curl.
- Browser
- Download file 6.6 kB
-
https://huggingface.co/VoidZeroe/ChatDEIP/resolve/main/README.md
- Command line
-
hf download hf://VoidZeroe/ChatDEIP/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/VoidZeroe/ChatDEIP/resolve/main/README.md
6.6 kB
| library_name: peft | |
| license: other | |
| language: | |
| - en | |
| metrics: | |
| - accuracy | |
| base_model: | |
| - TheBloke/LLaMA-7b-GGUF | |
| ChatDEIP | |
| ============================== | |
| **ChatDEIP** is a conversational AI front end portal for Edge Infrastructure as a Service platform whose software architecture comprises of three main components, namely: Platform manager and certain telemetry components that runs on the cluster, Intel Backend and the Platform Director. | |
| This interactive interface helps you to navigate the platform and provides you with answers to questions about the platform. | |
| We utilized a pre-trained LLaMa model which is a 7B-parameter model and Finetuned it using the [Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca) Self Instruct Methodology. | |
| The model was fine-tuned on our domain specific dataset obtained from the IaaS plaform for 3 tasks: | |
| - Causal LM | |
| - Function Calling | |
| - Flux Query Generation | |
| ## Training procedure | |
| The following `bitsandbytes` quantization config was used during training: | |
| - load_in_8bit: False | |
| - load_in_4bit: True | |
| - llm_int8_threshold: 6.0 | |
| - llm_int8_skip_modules: None | |
| - llm_int8_enable_fp32_cpu_offload: False | |
| - llm_int8_has_fp16_weight: False | |
| - bnb_4bit_quant_type: nf4 | |
| - bnb_4bit_use_double_quant: False | |
| - bnb_4bit_compute_dtype: float16 | |
| ### Framework versions | |
| - PEFT 0.4.0 | |
| ChatDEIP is a Natural language interface for EdgeIaaS infrastructure. | |
| this was built on a methodology similar to Alpaca Lora's self instruct paper, | |
| first we collated a dataset of flux Queries Generated with Heuristics then used GPT3.5 to generate a matching user conversation structure to match the Generated Queries. we repeated the same process for the function calling Dataset and then trained a LLAMA v1 using the [low-rank adaptation (LoRA)](https://arxiv.org/pdf/2106.09685.pdf), which freezes the pretrained model weights and injects trainable rank decomposition matrices into each | |
| layer of the Transformer architecture, greatly reducing the number of trainable parameters for downstream tasks. For fine-tuning, the Hugging Face's [PEFT](https://github.com/huggingface/peft) and the Tim Dettmers' [bitsandbytes](https://github.com/TimDettmers/bitsandbytes) was used. | |
| ## Documentation | |
| * [Quickstart]() | |
| * [User Guide]() | |
| * [API Reference]() | |
| * [Examples]() | |
| ## Pre-requisite | |
| * Operating System | |
| - This set up was done using Linux Ubuntu v22.04 | |
| * Programming Language | |
| - Python version >=3.9 | |
| * Hardware used | |
| - Single A100 50GB GPU with 83GB of CPU RAM | |
| * Documentation: https://iaas-platform-conversational-ai.readthedocs.io. | |
| ## Quick Install | |
| We recommend to first setup a clean Python environment for your project with Python 3.7+ using your favorite tool | |
| ([conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html "conda-env"), | |
| [venv](https://docs.python.org/3/library/venv.html), [virtualenv](https://virtualenv.pypa.io/en/latest/) with | |
| or without [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/)). | |
| Once your environment is set up you can move to set up: | |
| ## How To Set up | |
| Clone the repository accordingly from your terminal whilst in your home directory. From your command line: | |
| ```bash | |
| # Clone this repository | |
| $ git clone https://github.com/VoidZeroe/ChatDEIP.git | |
| # Change directory | |
| $ cd ChatDEIP | |
| # Install dependencies | |
| $ pip3 install -r requirements.txt | |
| # To run the app demo, on your current terminal: | |
| $ python3 main.py | |
| ``` | |
| If bitsandbytes doesn't work, [install it from source.](https://github.com/TimDettmers/bitsandbytes/blob/main/compile_from_source.md) | |
| > **Note* | |
| > This might take a couple of minutes to run depending on your hardware (CPU or GPU). Once complete, the app should be up and running on your browser on the default port at: http://localhost:7861/ or http://localhost:7860/. Feel free to specify or change to your port of preference. | |
| Directory Structure | |
| ------------ | |
| βββ LICENSE | |
| βββ Makefile <- Makefile with commands like `make data` or `make train` | |
| βββ README.md <- The top-level README for developers using this project. | |
| βββ data | |
| βΒ Β βββ external <- Data from third party sources. | |
| βΒ Β βββ interim <- Intermediate data that has been transformed. | |
| βΒ Β βββ processed <- The final, canonical data sets for modeling. | |
| βΒ Β βββ raw <- The original, immutable data dump. | |
| β | |
| βββ docs <- A default Sphinx project; see sphinx-doc.org for details | |
| β | |
| βββ models <- Trained and serialized models, model predictions, or model summaries | |
| β | |
| βββ notebooks <- Jupyter notebooks. Naming convention is a number (for ordering), | |
| β the creator's initials, and a short `-` delimited description, e.g. | |
| β `1.0-jqp-initial-data-exploration`. | |
| | | |
| βββ scripts <- Scripts used for data extraction and conversion. | |
| β | |
| βββ references <- Data dictionaries, manuals, and all other explanatory materials. | |
| β | |
| βββ reports <- Generated analysis as HTML, PDF, LaTeX, etc. | |
| βΒ Β βββ figures <- Generated graphics and figures to be used in reporting | |
| β | |
| βββ requirements.txt <- The requirements file for reproducing the analysis environment, e.g. | |
| β generated with `pip freeze > requirements.txt` | |
| β | |
| βββ setup.py <- makes project pip installable (pip install -e .) so src can be imported | |
| βββ src <- Source code for use in this project. | |
| βΒ Β βββ __init__.py <- Makes src a Python module | |
| β β | |
| βΒ Β βββ data <- Scripts to download or generate data | |
| βΒ Β βΒ Β βββ make_dataset.py | |
| β β | |
| βΒ Β βββ features <- Scripts to turn raw data into features for modeling | |
| βΒ Β βΒ Β βββ build_features.py | |
| β β | |
| βΒ Β βββ models <- Scripts to train models and then use trained models to make | |
| β β β predictions | |
| βΒ Β βΒ Β βββ predict_model.py | |
| βΒ Β βΒ Β βββ train_model.py | |
| β β | |
| βΒ Β βββ visualization <- Scripts to create exploratory and results oriented visualizations | |
| βΒ Β βββ visualize.py | |
| β | |
| βββ tox.ini <- tox file with settings for running tox; see tox.readthedocs.io | |
| -------- |