somnath-das commited on
Commit
11bf287
Β·
verified Β·
1 Parent(s): 9ece01f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +121 -3
README.md CHANGED
@@ -1,3 +1,121 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # OnLLM 🧠
6
+ 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.
7
+
8
+ > 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.
9
+
10
+ ### Features
11
+ 1. An inbuild chatbot to chat with the AI model(s).
12
+ 2. No trackers, no Ads, No data collection, completely Private.
13
+
14
+ [![GitHub Downloads](https://img.shields.io/github/downloads/daslearning-org/OnLLM/total)](https://github.com/daslearning-org/OnLLM/releases)
15
+ [![YouTube Video Views](https://img.shields.io/youtube/views/D-KwL59GgKA)](https://www.youtube.com/watch?v=D-KwL59GgKA)
16
+
17
+ ## πŸ“½οΈ Demo
18
+ 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>
19
+ [![OnLLM-YouTube](./docs/images/thumb.png)](https://www.youtube.com/watch?v=D-KwL59GgKA)
20
+
21
+ ## πŸ–§ Our Scematic Architecture
22
+ To be added...
23
+
24
+ ## πŸ§‘β€πŸ’» Quickstart Guide
25
+
26
+ ### πŸ“± Download & Run the Android App
27
+ 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.
28
+
29
+ ### πŸ’» Download & Run the Windows or Linux App
30
+ 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.
31
+
32
+ #### Notes:
33
+ - Some Antivirus softwares might give you detection alert for the exe (happens for PyInstaller apps), you need to add an exception in that case.
34
+ - On Linux you may need to change file permission to execute it.
35
+ ```bash
36
+ chmod +x OnLLM_Linux_XXX
37
+ ./OnLLM_Linux_XXX
38
+ ```
39
+
40
+ ### 🐍 Run with Python
41
+
42
+ 1. Clone the repo
43
+ ```bash
44
+ git clone https://github.com/daslearning-org/OnLLM.git
45
+ ```
46
+
47
+ 2. Run the application
48
+ ```bash
49
+ cd OnLLM/app/
50
+ pip install -r requirements.txt # virtual environment is recommended
51
+ python main.py
52
+ ```
53
+
54
+ ## 🦾 Build your own App
55
+ The Kivy project has a great tool named [Buildozer](https://buildozer.readthedocs.io/en/latest/) which can make mobile apps for `Android` & `iOS`
56
+
57
+ ### πŸ“± Build Android App
58
+ 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`
59
+
60
+ #### Install Rust & Add that in path
61
+ ```bash
62
+ curl https://sh.rustup.rs -sSf | sh # then follow the prompt
63
+ export PATH="$HOME/.cargo/bin:$PATH"
64
+ # optional
65
+ rustup default stable
66
+ ```
67
+
68
+ #### Install other dependencies & build APK
69
+ ```bash
70
+ # add the python repository
71
+ sudo add-apt-repository ppa:deadsnakes/ppa
72
+ sudo apt update
73
+
74
+ # install all dependencies.
75
+ 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
76
+
77
+ # optionally we can default to python 3.11
78
+ sudo ln -sf /usr/bin/python3.11 /usr/bin/python3
79
+ sudo ln -sf /usr/bin/python3.11 /usr/bin/python
80
+ sudo ln -sf /usr/bin/python3.11-config /usr/bin/python3-config
81
+
82
+ # optionally you may check the java installation with below commands
83
+ java -version
84
+ javac -version
85
+
86
+ # install python modules
87
+ git clone https://github.com/daslearning-org/OnLLM.git
88
+ cd OnLLM/app/
89
+ python3.11 -m venv .env # create python virtual environment
90
+ source .env/bin/activate
91
+ pip install -r req_android.txt
92
+
93
+ # build the android apk
94
+ buildozer android debug # this may take a good amount of time for the first time & will generate the apk in the bin directory
95
+ ```
96
+
97
+ ### πŸ–³ Build Computer Application (Windows / Linux / MacOS)
98
+ A `Python` virtual environment is recommended and will use `PyInstaller` to package it.
99
+
100
+ ```bash
101
+ # install pyinstaller
102
+ git clone https://github.com/daslearning-org/OnLLM.git
103
+ cd OnLLM/app/
104
+ python3.11 -m venv .env # create python virtual environment
105
+ source .env/bin/activate
106
+ pip install -r requirements.txt
107
+ pip install pyinstaller
108
+
109
+ # then update the spec file as needed
110
+ # then build your app which will be native to the OS i.e. Linux or Windows or MAC
111
+ pyinstaller desktopApp.spec
112
+ ```
113
+
114
+ ## πŸ”— LLM Models used in this project
115
+ The models are being taken from different sources & below are the models available as on today. Size is the compressed size (approax).
116
+
117
+ | Model | Size | Android | Desktop |
118
+ | :---- | :--- | :-----: | :-----: |
119
+ | [SmolLM2-135M](https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct) | 95MB | βœ…οΈ | βœ…οΈ |
120
+ | [SmolLM2-360M](https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct) | 241MB | βœ…οΈ | βœ…οΈ |
121
+ | [Gemma3-1B](https://huggingface.co/onnx-community/gemma-3-1b-it-ONNX) | 1GB | ❌ | βœ…οΈ |