SliceX AI™ ELM (Efficient Language Models)
This repository contains code to run our ELM models.
Models are located in the "models" folder. ELM models in this repository comes in three sizes (elm-1.0, elm-0.75 and elm-0.25) and supports the following use-case.
- news_content_generation
Download ELM repo
sudo apt-get intall git-lfs
git lfs install
git clone git@hf.co:slicexai/elm-v0.1_news_content_generation
(Optional) Installing git-lfs without sudo,
wget https://github.com/git-lfs/git-lfs/releases/download/v3.2.0/git-lfs-linux-amd64-v3.2.0.tar.gz
tar -xzf git-lfs-linux-amd64-v3.2.0.tar.gz
PATH=$PATH:/<absolute-path>/git-lfs-3.2.0/
git lfs install
Installation
cd elm-v0.1_news_content_generation
pip install -r requirements.txt
How to use - Run ELM on a sample task
python run.py <elm-model-directory>
E.g. python run.py models/elm-0.75_news_content_generation
Prompts for the specific tasks can be found in the corresponding checkpoint directory. See an example below in the form of models/elm-0.75_news_content_generation/example_prompts.json
.
{
"inputs": ["Scientists Invent 'Invisible' Metamaterial With Bonus Reflect Mode"],
"template": "[INST]The following headline is the headline of a news report. Please write the content of the news passage based on only this headline.\n\nHeadline: {input} \n\nContent:[/INST]"
}
Running the above command returns the following response
{
"prompt": "[INST]The following headline is the headline of a news report. Please write the content of the news passage based on only this headline.\n\nHeadline: Scientists Invent 'Invisible' Metamaterial With Bonus Reflect Mode \n\nContent:[/INST]",
"response": "A team of scientists have created an invisible material that can make objects disappear. It is made of a special material that creates a layer of nanoscale dots that allow light to enter from the material, directing it to a layer of gas that allows light to enter from the material. The material is able to levitate and roll off its surface without leaving the material. This technology could have many future applications in battery technology, microelectronics, and more. A video demonstrating the material is available in the article."
}