Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A LLM-powered chat assistant for the energy industry

Overview

Coming soon

Installation

If you are unable to access the GitHub website, you can open the hosts file with Notepad at C:\Windows\System32\drivers\etc\hosts (for Android system) or at etc/hosts (for Linux/Mac). At the end of the file, add the following lines:

20.205.243.166 github.com  
20.205.243.166 www.github.com  
20.205.243.166 api.github.com  
20.205.243.166 assets-cdn.github.com  
20.205.243.166 raw.githubusercontent.com  
20.205.243.166 gist.github.com  

After saving and closing the file, refresh the DNS cache by opening the terminal and running:

For Windows:

ipconfig /flushdns  

For Linux/Mac:

sudo systemd-resolve --flush-caches  

Create the conda environment. We recommend using different conda environments to avoid conflicts, such as "internlm", "llama" and "qwen". Here is an example.

conda_env_name=llama
conda create -n $conda_env_name python=3.10.0 -y
conda activate $conda_env_name

After setting up the environment, some packages are necessary to be installed. We provide a requirements.txt. Please be careful about the version of these packages.

cd PIC_Project
pip install -r requirements.txt

Then, download the model checkpoints using the command . Make sure that you have suffient hard drive space. (Ensure that the path to the downloaded model contains only English characters.)

python download.py

Inference

We provide two ways to conduct LLMs' reasoning, i.e., online inference and API call.

Online infernce

Change the graphics card number and python file to utilize different models.

cd inference
CUDA_VISIBLE_DEVICES=0
python llama_online.py

API call

You should suspend the API service. This process may take ~30 seconds. Check whether the API service is successfully started in the corresponding log file in the "PIC_Project/log" folder.(Ensure that the server IP address of the computer has been modified.)

cd api_setup
bash llama_api.sh

Subsequently, use the conmand below to start your chat.

cd inference
python llama_offline.py

License

PIC_Project is carried out by six students of ECPK in Beihang University. For questions, please contact Linqing Zhong or Zhuyun Yuan.

About

This is the repo for the PIC project of ECPK, which aims to fine-tune the LLMs through utilizing the knowledges in the energy field.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages