cd /news/large-language-models/building-an-offline-open-weight-ai-c… · home › topics › large-language-models › article
[ARTICLE · art-147783] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

Building an Offline, Open-Weight AI Cycling Coach with Llama 3.2 and Python

A developer built Touch Grass, an open-source Python utility that runs the open-weight Llama 3.2 3B model locally via Ollama to generate cycling trail routes, gear checklists and safety plans without an internet connection. The script prompts users for a riding location and goal, then queries the on-device model to produce a structured offline trail plan, with the code published on GitHub.

by read2 min views1 publishedOct 8, 2026

Hey everyone! 👋

For this year's Hacktoberfest "Touch Grass" challenge, I wanted to build something that bridges the gap between technology and the great outdoors—while keeping data privacy front and centre.

MeetTouch Grass: Offline AI Cycling Coach: a lightweight Python utility that runs entirely on your local machine using an open-weight model to generate custom trail routes, gear checklists, and safety plans without needing an internet connection.

Why Build an Offline Cycling Coach?

Most fitness and outdoor apps rely heavily on cloud APIs, constant connectivity, and tracking your location on remote servers. As a cyclist heading out onto remote trails where cell service drops, I wanted an assistant that:

The Tech Stack

To keep things fast, lightweight, and completely local, I used:

Python (py) for the logic and terminal interface.

Ollama as the local inference engine.

Llama 3.2 (3B) as the open-weight model running locally on-device.

How It Works

The script prompts you for your riding location and goals, constructs an expert outdoor coaching prompt, and queries your local Llama 3.2 instance via Ollama.

Here is a sneak peek at the core script (coach.py):

python

import ollama

def generate_cycling_plan():

print("TOUCH GRASS: LOCAL OFFLINE LLAMA 3.2 COACH \n")
location = input("Enter your trail or riding location: ")
goal = input("Enter your ride goal (e.g., 20km gravel ride): ")

prompt = f"""
Act as an expert outdoor cycling coach and trail mapper. The user is riding in: {location}. Their goal is: {goal}.
Provide a structured response with:
1. Terrain and route recommendations.
2. Essential gear checklist.
3. Wildlife and traffic safety tips.
4. A screen-free outdoor encouragement tip.
"""

response = ollama.chat(model='llama3.2', messages=[
    {'role': 'user', 'content': prompt}
])

print("\n YOUR OFFLINE TRAIL PLAN:")
print(response.message.content)

if name == "main":

generate_cycling_plan()

The project is fully open-source. You can check out the complete repository, clone it, and run it locally on your own machine here:

[https://github.com/Nyateya/touch-grass-bike-couch]

Let me know what you think, and happy coding (and touching grass) this Hacktoberfest!

── more in #large-language-models 4 stories · sorted by recency
── more on @llama 3.2 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/building-an-offline-…] indexed:0 read:2min 2026-10-08 · —