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
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 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), 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 and the Tim Dettmers' bitsandbytes was used.
Documentation
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, venv, virtualenv with or without virtualenvwrapper).
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:
# 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.
*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
- Downloads last month
- -
Model tree for VoidZeroe/ChatDEIP
Base model
TheBloke/LLaMA-7b-GGUF