Git Product home page Git Product logo

phonelm's Introduction

PhoneLM

Running language models on a phone

This is the example code for running a powerful (as much as a 2019 phone can handle) language model on my Google Pixel 4 using the languagemodels python module. You can find the module on GitHub.

How it works

I run this using Termux on Ubuntu version 22.04 from Andronix.
I used the 1 and 2 GB RAM models for this project as the phone only has 6GB of available memory and the next highest model is 4GB which did work, but it was slow and eventually crashed termux after finishing.

I don't believe you need to have a rooted device for any of this, but I will say my phone is running rooted Pixel OS.

To run this you just need to 'pip install languagemodels' and then run either of the two python files in working scripts. Normal is a more simple one and just gets real time info about the date and time. Wikipedia version is a bit more complicated. Using multishot questions, it first looks for a topic in the user's question, then it'll search that topic and if it exists as a wiki page then it'll get a snippet as context to then respond to the original question. May Search for Paris sometimes.

Wouldn't be possible, or at least this easy, without languagemodels and its dependencies. (First one if counting my programming knowledge.)

phonelm's People

Contributors

anthonyg5005 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.