<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hope Nyateya</title>
    <description>The latest articles on DEV Community by Hope Nyateya (@nyateya).</description>
    <link>https://dev.to/nyateya</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4171950%2F6fa9c678-caa8-47e4-b466-fffc34927383.jpg</url>
      <title>DEV Community: Hope Nyateya</title>
      <link>https://dev.to/nyateya</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nyateya"/>
    <language>en</language>
    <item>
      <title>Building an Offline, Open-Weight AI Cycling Coach with Llama 3.2 and Python</title>
      <dc:creator>Hope Nyateya</dc:creator>
      <pubDate>Thu, 08 Oct 2026 19:32:20 +0000</pubDate>
      <link>https://dev.to/nyateya/building-an-offline-open-weight-ai-cycling-coach-with-llama-32-and-python-533</link>
      <guid>https://dev.to/nyateya/building-an-offline-open-weight-ai-cycling-coach-with-llama-32-and-python-533</guid>
      <description>&lt;p&gt;Hey everyone! 👋&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Why Build an Offline Cycling Coach?&lt;br&gt;
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:&lt;/p&gt;

&lt;p&gt;Requires zero internet: Works deep in the woods or on remote gravel roads.&lt;br&gt;
Protects privacy: Keeps personal routes, goals, and data strictly on-device.&lt;br&gt;
Encourages presence: Focuses on offline exploration rather than endless screen time.&lt;br&gt;
The Tech Stack&lt;br&gt;
To keep things fast, lightweight, and completely local, I used:&lt;br&gt;
Python (py) for the logic and terminal interface.&lt;br&gt;
Ollama as the local inference engine.&lt;br&gt;
Llama 3.2 (3B) as the open-weight model running locally on-device.&lt;/p&gt;

&lt;p&gt;How It Works&lt;br&gt;
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.&lt;/p&gt;

&lt;p&gt;Here is a sneak peek at the core script (coach.py):&lt;/p&gt;

&lt;p&gt;python&lt;br&gt;
import ollama&lt;/p&gt;

&lt;p&gt;def generate_cycling_plan():&lt;br&gt;
print("TOUCH GRASS: LOCAL OFFLINE LLAMA 3.2 COACH \n")&lt;/p&gt;

&lt;p&gt;location = input("Enter your trail or riding location: ")&lt;br&gt;
goal = input("Enter your ride goal (e.g., 20km gravel ride): ")&lt;/p&gt;

&lt;p&gt;prompt = f"""&lt;br&gt;
Act as an expert outdoor cycling coach and trail mapper. The user is riding in: {location}. Their goal is: {goal}.&lt;br&gt;
Provide a structured response with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Terrain and route recommendations.&lt;/li&gt;
&lt;li&gt;Essential gear checklist.&lt;/li&gt;
&lt;li&gt;Wildlife and traffic safety tips.&lt;/li&gt;
&lt;li&gt;A screen-free outdoor encouragement tip.
"""&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;response = ollama.chat(model='llama3.2', messages=[&lt;br&gt;
    {'role': 'user', 'content': prompt}&lt;br&gt;
])&lt;/p&gt;

&lt;p&gt;print("\n YOUR OFFLINE TRAIL PLAN:")&lt;br&gt;
print(response.message.content)&lt;br&gt;
if name == "main":&lt;br&gt;
generate_cycling_plan()&lt;/p&gt;

&lt;p&gt;The project is fully open-source. You can check out the complete repository, clone it, and run it locally on your own machine here:&lt;br&gt;
[&lt;a href="https://github.com/Nyateya/touch-grass-bike-couch" rel="noopener noreferrer"&gt;https://github.com/Nyateya/touch-grass-bike-couch&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;Let me know what you think, and happy coding (and touching grass) this Hacktoberfest!&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>opensource</category>
      <category>hacktoberfest</category>
    </item>
  </channel>
</rss>
