DEV Community

Cover image for your_offline_ai: Easy access to an open-weight local model for my friend in a remote area
Sam Boaz S K
Sam Boaz S K

Posted on

your_offline_ai: Easy access to an open-weight local model for my friend in a remote area

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

People living in urban areas have good tower connectivity. It helps us surf the internet and access LLMs, agentic AI and much more. At the core, it comes down to stable connectivity, which we often take for granted. My friend lives in a rural place where getting signal is not easy. He is eager to use and learn about AI, and that is why this idea came to me. This open-weight model runs locally on his laptop, thus eliminating dependency on the internet after the initial setup.

Demo

Chatting offline with PHI-3 mini - wifi turned off - screenshot styled with carbon for readability
This is an interactive, terminal-based system. Why not a web app or deployment on Vercel? Because of the main problem: unstable internet connectivity. I think this is one of the best and most efficient ways for my friend to access this open-weight model.

Code

This is a chatbot that runs without internet! Phi-3 Mini - open-weight model from Microsoft, very lightweight - works well even on 4GB RAM.

Install Ollama from http://ollama.com Run: ollama run phi3:mini in terminal Install Python module: pip install ollama Then run main.py — that's it!

How it works?: Your question -> Python -> Local model -> Answer




How I Built It

First, I installed Ollama and ran the Phi-3 Mini model, which is one of the lightest models and works even on 4GB RAM.

Second, I built a small terminal-based interactive session between the user and the model, coded entirely in Python.

Finally, I added an option to terminate the interaction.

My project's core is an open-weight model.

This project is simple, but it solves a real problem in my friend's life.

Why Does Open Innovation Matter?

Open innovation matters because closed models need internet, API keys and payments. Open-weight models run locally, free and private, and give access to people who don't have stable connectivity.

Top comments (0)