Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved README instructions for building in Termux on Android devices #2840

Closed
wants to merge 18 commits into from
Closed

Improved README instructions for building in Termux on Android devices #2840

wants to merge 18 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Aug 27, 2023

Added direction to build with make, simplified OpenBlas, and CLBlast installation method. Clarified where to move models in Termux. llama.cpp is diverse, so I added a main Usage example for new users.

These instructions should work for any Android device capable of running llama.cpp.

JackJollimore added 3 commits August 27, 2023 14:44
Added direction to build with `make`, and simplified `OpenBlas` method. These instructions should work for any Android device capable of running `llama.cpp`.

Clarified on where to _move_ the models in Termux. `llama.cpp` is diverse, so I added a Usage example for new users.

I left `CLBlast` instructions unchanged for now.
made Usage example more clear in the case Users build with cmake
@ghost ghost changed the title Improve README.md for building in Termux on Android devices Improved README instructions for building in Termux on Android devices Aug 27, 2023
$HOME before make is unneccesary.

If User is new with Termux then typing cd storage/downloads before $HOME is confusing.

clarified directions.
@cebtenzzre
Copy link
Collaborator

What is $HOME meant to do? My Termux has the bash shell so running it as a command would just print an error.

@ghost
Copy link
Author

ghost commented Aug 27, 2023

What is $HOME meant to do? My Termux has the bash shell so running it as a command would just print an error.

Thanks for pointing that out. I expected $HOME to navigate to /data/data/com.termux/files/home in Termux.

I replaced $HOME for cd as it has the same effect.

$HOME is the executables directory in Termux. llama.cpp is significantly slower when loading a model from the downloads folder, for example.

$HOME is a script within fish shell, assuming User uses bash then we use `cd` to navigate to /data/data/com.termux/files/home
@staviq
Copy link
Collaborator

staviq commented Aug 28, 2023

If I remember correctly, android "sandboxes" apps such that native home folder is the app folder, and I checked with termux, not sure about other apps, but standard unix ~ works in termux, and resolves to /data/data/com.termux/files/home

Edit: I saw the diff, and I now know what you meant, but I agree $HOME is a bit confusing, so I would just say "termux app directory ( which is automatically mapped to home directory )" or something like that.

remove reference to Termux `$HOME` path.
@ghost
Copy link
Author

ghost commented Aug 28, 2023

I would just say "termux app directory ( which is automatically mapped to home directory )" or something like that.

I removed $HOME because my intention is to make sure the User moves the model to the correct spot.

Thank you.

@cebtenzzre
Copy link
Collaborator

I removed $HOME because my intention is to make sure the User moves the model to the correct spot.

I think it would be sufficient to say "to the home directory (~/)". The example doesn't use its full path, and the user shouldn't have to know or care what the absolute path technically is.

JackJollimore added 2 commits August 28, 2023 00:17
User needs to move the model to the correct location, and doesn't need to know/care about the absolute path in Termux
JackJollimore added 3 commits August 30, 2023 21:53
original example was generic, adjusted --prompt to fit alpaca-style
typo fixed
also looks better, and consistent
@ghost
Copy link
Author

ghost commented Aug 31, 2023

@cebtenzzre Are there any other inconsistencies, or changes neccesary here?

@cebtenzzre
Copy link
Collaborator

Are there any other inconsistencies, or changes neccesary here?

Have you seen my review comments?

@ghost
Copy link
Author

ghost commented Aug 31, 2023

Have you seen my review comments?

Hmm, I don't see a review comment, other than a couple days ago: #2840 (comment) - I implemented the change here: 0a7ef3a

I don't know where it is.

@cebtenzzre
Copy link
Collaborator

cebtenzzre commented Aug 31, 2023

Hmm, I don't see a review comment

Do you see them here?

edit: oops, looks like I made comments but forgot to submit the review.

@ghost
Copy link
Author

ghost commented Aug 31, 2023

Do you see them here?

I see now, let me check it out. Thank you.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
JackJollimore added 5 commits August 31, 2023 20:52
Replaced outdated, ineffecient steps for a streamlined method.
made export better for copy/pasting, looks better
now is correctly matched with `CLBlast` & `llama.cpp`
@ghost
Copy link
Author

ghost commented Sep 1, 2023

regarding CLBlast, a Note from current master: (some Android devices, like the Zenfone 8, need the following command instead - "export LD_LIBRARY_PATH=/system/vendor/lib64:$LD_LIBRARY_PATH".), then it links to reddit.

Certain devices export from LD_LIBRARY_PATH=/vendor/, others export from LD_LIBRARY_PATH=/system/, so I think it makes sense to note the alternative for compatibility purposes.

JackJollimore added 2 commits September 1, 2023 02:19
Some devices path from Vendor, others path from System
@ghost ghost closed this by deleting the head repository Sep 6, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants