somnath-das commited on
Commit
2815836
Β·
verified Β·
1 Parent(s): 4c1d30c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +118 -3
README.md CHANGED
@@ -1,3 +1,118 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+ # OnLLM 🧠
5
+ OnLLM is the platform to run `Large Language Model` (LLM) or SLM models using `OnnxRuntime` directly on low-end devices like low power computers, mobile phones etc. It is cross-platform using Kivy & open-source.
6
+
7
+ > The name is derived from: `On` from Onnx + `LLM`. Our approach is always local & offline first (you will need internet to download the model files for the first time). Arificial Intelligence (AI) to be accesible to everyone.
8
+
9
+ ### Features
10
+ 1. An inbuild chatbot to chat with the AI model(s).
11
+ 2. No trackers, no Ads, No data collection, completely Private.
12
+
13
+ [![GitHub Downloads](https://img.shields.io/github/downloads/daslearning-org/OnLLM/total)](https://github.com/daslearning-org/OnLLM/releases)
14
+ [![YouTube Video Views](https://img.shields.io/youtube/views/D-KwL59GgKA)](https://www.youtube.com/watch?v=D-KwL59GgKA)
15
+
16
+ ## πŸ“½οΈ Demo
17
+ You can click on the below Image or this [Youtube Link](https://www.youtube.com/watch?v=D-KwL59GgKA) to see the demo. Please let me know in the comments, how do you feel about this App. <br>
18
+ [![OnLLM-YouTube](./docs/images/thumb.png)](https://www.youtube.com/watch?v=D-KwL59GgKA)
19
+
20
+ ## πŸ–§ Our Scematic Architecture
21
+ To be added...
22
+
23
+ ## πŸ§‘β€πŸ’» Quickstart Guide
24
+
25
+ ### πŸ“± Download & Run the Android App
26
+ You can check the [Releases](https://github.com/daslearning-org/OnLLM/tags) and downlaod the latest version of the android app (APK file) on your phone.
27
+
28
+ ### πŸ’» Download & Run the Windows or Linux App
29
+ You can check the [Releases](https://github.com/daslearning-org/OnLLM/releases) and downlaod the latest version of the application on your computer. If you are on `Windows`, download the `OnLLM_X.X.X.exe` file & double click to run it. If you are on `Linux`, download `OnLLM_Linux_XXX` file and run it.
30
+
31
+ #### Notes:
32
+ - Some Antivirus softwares might give you detection alert for the exe (happens for PyInstaller apps), you need to add an exception in that case.
33
+ - On Linux you may need to change file permission to execute it.
34
+ ```bash
35
+ chmod +x OnLLM_Linux_XXX
36
+ ./OnLLM_Linux_XXX
37
+ ```
38
+
39
+ ### 🐍 Run with Python
40
+
41
+ 1. Clone the repo
42
+ ```bash
43
+ git clone https://github.com/daslearning-org/OnLLM.git
44
+ ```
45
+
46
+ 2. Run the application
47
+ ```bash
48
+ cd OnLLM/app/
49
+ pip install -r requirements.txt # virtual environment is recommended
50
+ python main.py
51
+ ```
52
+
53
+ ## 🦾 Build your own App
54
+ The Kivy project has a great tool named [Buildozer](https://buildozer.readthedocs.io/en/latest/) which can make mobile apps for `Android` & `iOS`
55
+
56
+ ### πŸ“± Build Android App
57
+ A Linux environment is recommended for the app development. If you are on Windows, you may use `WSL` or any `Virtual Machine`. As of now the `buildozer` tool works on Python version `3.11` at maximum. I am going to use Python `3.11`
58
+
59
+ #### Install Rust & Add that in path
60
+ ```bash
61
+ curl https://sh.rustup.rs -sSf | sh # then follow the prompt
62
+ export PATH="$HOME/.cargo/bin:$PATH"
63
+ # optional
64
+ rustup default stable
65
+ ```
66
+
67
+ #### Install other dependencies & build APK
68
+ ```bash
69
+ # add the python repository
70
+ sudo add-apt-repository ppa:deadsnakes/ppa
71
+ sudo apt update
72
+
73
+ # install all dependencies.
74
+ sudo apt install -y ant autoconf automake ccache cmake g++ gcc libbz2-dev libffi-dev libltdl-dev libtool libssl-dev lbzip2 make ninja-build openjdk-17-jdk patch patchelf pkg-config protobuf-compiler python3.11 python3.11-venv python3.11-dev
75
+
76
+ # optionally we can default to python 3.11
77
+ sudo ln -sf /usr/bin/python3.11 /usr/bin/python3
78
+ sudo ln -sf /usr/bin/python3.11 /usr/bin/python
79
+ sudo ln -sf /usr/bin/python3.11-config /usr/bin/python3-config
80
+
81
+ # optionally you may check the java installation with below commands
82
+ java -version
83
+ javac -version
84
+
85
+ # install python modules
86
+ git clone https://github.com/daslearning-org/OnLLM.git
87
+ cd OnLLM/app/
88
+ python3.11 -m venv .env # create python virtual environment
89
+ source .env/bin/activate
90
+ pip install -r req_android.txt
91
+
92
+ # build the android apk
93
+ buildozer android debug # this may take a good amount of time for the first time & will generate the apk in the bin directory
94
+ ```
95
+
96
+ ### πŸ–³ Build Computer Application (Windows / Linux / MacOS)
97
+ A `Python` virtual environment is recommended and will use `PyInstaller` to package it.
98
+
99
+ ```bash
100
+ # install pyinstaller
101
+ git clone https://github.com/daslearning-org/OnLLM.git
102
+ cd OnLLM/app/
103
+ python3.11 -m venv .env # create python virtual environment
104
+ source .env/bin/activate
105
+ pip install -r requirements.txt
106
+ pip install pyinstaller
107
+
108
+ # then update the spec file as needed
109
+ # then build your app which will be native to the OS i.e. Linux or Windows or MAC
110
+ pyinstaller desktopApp.spec
111
+ ```
112
+
113
+ ## πŸ”— LLM Models used in this project
114
+ The models are being taken from different sources & below are the models available as on today. Size is the compressed size (approax).
115
+
116
+ | Model | Size | Android | Desktop |
117
+ | :---- | :--- | :-----: | :-----: |
118
+ | [SmolLm-135M](https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct) | 95MB | βœ…οΈ | βœ…οΈ |