<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Roshan Venugopal on Medium]]></title>
        <description><![CDATA[Stories by Roshan Venugopal on Medium]]></description>
        <link>https://medium.com/@roshan.venugopal?source=rss-fd3166f4237c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*N114MQly_adYsOTd.jpg</url>
            <title>Stories by Roshan Venugopal on Medium</title>
            <link>https://medium.com/@roshan.venugopal?source=rss-fd3166f4237c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 19:41:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@roshan.venugopal/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hacking and building your ring]]></title>
            <link>https://medium.com/@roshan.venugopal/hacking-and-building-your-ring-3302edb751f7?source=rss-fd3166f4237c------2</link>
            <guid isPermaLink="false">https://medium.com/p/3302edb751f7</guid>
            <dc:creator><![CDATA[Roshan Venugopal]]></dc:creator>
            <pubDate>Sat, 14 Nov 2026 16:49:28 GMT</pubDate>
            <atom:updated>2026-11-15T00:01:27.096Z</atom:updated>
            <content:encoded><![CDATA[<p>The dark lord <a href="https://www.google.com/search?kgmid=%2Fm%2F0g3dc&amp;q=Sauron">Sauron</a> secretly forged the One Ring in the fires of Mount Doom to rule and bind all the other <a href="https://en.wikipedia.org/wiki/Rings_of_Power">Rings of Power</a>.</p><p>I am no dark lord but I wanted to forge a ring. Well I am not good at forging so instead I bought a $20 smart ring and hacked it with Claude</p><p>Professional rings like Oura cost around $400, plus a monthly subscription. So I tried an experiment: buy a $20 Colmi R09 ring from Alibaba and see how close I could get to Oura with nothing but a Mac, some curiosity, and Claude as my hardware hacking partner.</p><p>Spoiler: Its harder than expected, and more fun than I expected.</p><h3>Day one: the ring wouldn’t talk</h3><p>I plugged in, turned on Bluetooth, and… nothing useful. The Mac could see the ring, but every connection dropped within a second. First suspect: my phone, which kept grabbing the ring back. The real culprit was stranger and took a lot of time to find a fix. MacOS had quietly paired the ring as a Bluetooth mouse. Once we told the Mac to forget it, the ring finally answered.</p><h3>Turning everything on</h3><p>Cheap rings ship with most sensors switched off to save battery. Claude worked out the ring’s Bluetooth commands and switched on everything: heart rate every 10 minutes, blood oxygen, stress, HRV and skin temperature. It even saved a backup of the original settings first, in case we bricked something.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yjsl9GdyDt4H4TM1eus7yQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9DauLZ1w78__05ht6NA6nw.jpeg" /></figure><h3>Building the tracker</h3><p>The ring only stores about a week of raw data. Raw data isn’t insight. So we (me and Claude) built a sync script that pulls the data to my machine and a dashboard that turns it into Apple style scores.</p><p>My first night:</p><ul><li>Sleep score 75: 5h 58m asleep, 81 minutes of deep sleep, not enough REM</li><li>Readiness 82</li><li>Resting heart rate 58, HRV 37 ms, SpO2 98%</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZSNfepfE59PE72E6Y1ncZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ICLvpoje8YLe0sHynRJgNA.png" /></figure><p>Not bad for $20.</p><h3>What went wrong</h3><p>Plenty. The first morning sync gave up too fast and showed an empty dashboard. Ring taps never reached the Mac, so that idea is parked. And with every sensor on, the battery went from full to zero in about a day. Each problem became the next fix.</p><p>It’s not an Oura. It doesn’t have their years of sleep research. Calibration is not there, so I can be sure of what I am measuring.</p><p>But I own the data.</p><h3>What I learned</h3><ol><li>Cheap hardware is often capable hardware with the features turned off, and usually for a reason: battery.</li><li>Buy 2 instead of one. You can accidentally brick one and then its very frustrating to wait for another one to come.</li><li>An AI partner like Claude changes the economics of tinkering. I didn’t need to know Bluetooth protocols. I needed to describe what I wanted and stay curious when things broke.</li><li>The polish is difficult e.g. Background sync and week-long battery life. They’re the hardest to hack.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3302edb751f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Security for Vibecoders]]></title>
            <link>https://medium.com/@roshan.venugopal/security-for-vibecoders-300b3f4cc01a?source=rss-fd3166f4237c------2</link>
            <guid isPermaLink="false">https://medium.com/p/300b3f4cc01a</guid>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Roshan Venugopal]]></dc:creator>
            <pubDate>Sat, 07 Nov 2026 01:10:11 GMT</pubDate>
            <atom:updated>2026-11-07T01:10:11.945Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’re a vibe coder like me, Cloudflare just made security a lot more approachable.</p><p>They open-sourced the security-audit skill that seeded their own vulnerability discovery harness. Give it to Claude and ask it to audit your repo. Have an adversarial agent try to disprove each finding, and a senior-developer agent propose the smallest fix. Then have it file each surviving finding as an issue not as a codex fix.</p><p>Note 1: If your repo is public, file the issues in a private tracker repo. A public issue describing a vulnerability tells attackers where to look before you’ve fixed it.</p><p>Then review the issues and fix them one at a time.<br>It’s slow and steady, and that’s the point. You won’t be wading through thousands of lines of code you barely know. You’ll handle a well explained problem at a time, with the evidence in front of you.</p><p>Note 2: This is an expensive skill. so only run on your important repos.</p><p><a href="https://github.com/cloudflare/security-audit-skill">https://github.com/cloudflare/security-audit-skill</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=300b3f4cc01a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Auto Ontology]]></title>
            <link>https://medium.com/@roshan.venugopal/auto-ontology-7489d7b17905?source=rss-fd3166f4237c------2</link>
            <guid isPermaLink="false">https://medium.com/p/7489d7b17905</guid>
            <category><![CDATA[ontology]]></category>
            <dc:creator><![CDATA[Roshan Venugopal]]></dc:creator>
            <pubDate>Sat, 07 Nov 2026 01:04:03 GMT</pubDate>
            <atom:updated>2026-11-07T01:04:03.690Z</atom:updated>
            <content:encoded><![CDATA[<p>NVIDIA just open-sourced Auto Ontology, and I highly recommend it. One expectation to set first. It’s not something you point at a database and walk away from. You need to put in the effort to review it and optimize it, and then make sure you have a metrics layer to partner with this. Once this is done, you can have a MCP and all the information is available to Codex or Claude or your agent.</p><p>The problem it solves: Agents can write SQL, but an answer that’s fast and wrong is worse than no answer. “What was revenue for X in June?” only works if the agent knows which table holds revenue, how the tables join, and what “revenue” actually means in your business.</p><p>Auto Ontology gets you about 70% of the way there automatically. <br>The last 30% is the work that makes it great. Building and approving the metrics layer, which is where IT and Business needs to participate. Most difficult phase in my opinion.</p><p>A. Review each term. Is “Member” the same as “Subscriber” here? Which table is the SOT.</p><p>B. Approve the SQL attributes. Does “revenue” mean gross or net? Do we exclude reversals? What’s the date logic?</p><p>C. Test with the real questions your teams ask.</p><p>D. Certify the definitions once they’re right, so every agent computes margin, revenue, or utilization the same way every time.</p><p>That certification step turns a guessing engine into a trusted one. Once a measure is certified, the agent reuses it instead of improvising its own SQL. Answers come back with the SQL and the reasoning, so you can trace any number back to an approved definition. If the data can’t answer a question, Agents can says so instead of making something up. Make sure your Agent guardrails are to enforce this.</p><p>𝗛𝗮𝗿𝗱𝗲𝗻 𝗶𝘁<br>The quickstart is built for a laptop demo. <br>→ Choose where your data goes. By default, schema details and sample values go to NVIDIA’s hosted models. <br>→ Connect with a read-only database user, and use schema and table allowlists to scope what it can see.<br>→ IMP: Turn on Vault. Without it, connection credentials are stored in plaintext in Postgres.<br>→ Wire up SSO and RBAC, and issue scoped API tokens for agents.<br>→ Leave the optional external prediction service off until your data review clears it.<br>Put in that effort and you end up with a fantastic ontology: governed, tested, and safe to put in front of agents. The payoff compounds as every correction folds back into shared context.</p><p>A few things I liked under the hood:<br>→ No new graph database. The graph lives in Postgres + pgvector. <br>→ Apache Ossie import and export, so it complements the semantic models you already own.<br>→ A built-in MCP server, so Claude, Cursor, or your own agent can use it directly.<br>→ Docker Compose locally, Helm on Kubernetes in production.<br>My takeaway: the tooling for agentic analytics is getting good fast. The bottleneck is no longer the AI. It’s the human work of defining, testing and securing the context that agents rely on.</p><p>Repo <a href="https://github.com/NVIDIA/auto-ontology">https://github.com/NVIDIA/auto-ontology</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7489d7b17905" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Set Up a New Mac for AI Coding in 2026 (And Actually Vibecode Like a Boss)]]></title>
            <link>https://medium.com/@roshan.venugopal/how-to-set-up-a-new-mac-for-ai-coding-in-2026-and-actually-vibecode-like-a-boss-0e1892812dce?source=rss-fd3166f4237c------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e1892812dce</guid>
            <dc:creator><![CDATA[Roshan Venugopal]]></dc:creator>
            <pubDate>Sat, 04 Apr 2026 01:14:12 GMT</pubDate>
            <atom:updated>2026-04-04T01:14:12.758Z</atom:updated>
            <content:encoded><![CDATA[<p>Most Mac setup guides give you a list of apps to install. This one gives you a working system: a safe baseline, a reproducible script, and a dual-agent AI coding workflow that actually keeps you in control.</p><p>I set up a new Mac M5 recently. Codex handled the machine baseline. Claude handled the agent layer on top. Then I fused both into one setup script and one article. This is that article.</p><p>— -</p><h3><strong>Part 1: The Mac Baseline (Don’t Break What Apple Already Did)</strong></h3><p><strong>Start from what macOS already gives you</strong></p><p>The first thing to check on a fresh Mac is what you already have. New machines in 2026 come further along than most people expect:</p><blockquote><em>xcode-select — print-path # probably already installed</em></blockquote><blockquote><em>git — version # Apple Git is already there</em></blockquote><blockquote><em>which brew # Homebrew wired through ~/.zprofile</em></blockquote><p>On M5, all three were already present. That meant no force-installing Git, no rewriting the login shell, no unnecessary noise. The goal is additive changes only.</p><p><strong>Add guardrails before adding tools</strong></p><p>Before installing anything, create `~/AGENTS.md`. This is the home-level operating contract for every AI agent and script that will ever touch this machine:</p><blockquote><strong><em># Home Agent Guardrails</em></strong></blockquote><blockquote><em>- Never delete files or folders unless I explicitly ask.</em></blockquote><blockquote><em>- Never overwrite existing settings without checking first.</em></blockquote><blockquote><em>- Prefer additive changes over destructive ones.</em></blockquote><blockquote><em>- Do not use rm -rf, git reset — hard, or bulk cleanup commands unless clearly requested.</em></blockquote><blockquote><em>- Show a plan before substantial changes.</em></blockquote><blockquote><em>- When unsure, ask instead of guessing.</em></blockquote><p>This sounds small. It is not. It is the difference between an agent that helps and an agent that silently trashes your environment.</p><p><strong>Create a predictable workspace</strong></p><blockquote>mkdir -p ~/Documents/github</blockquote><p>Every clone, every side project, every script lives here. Simple decision, zero regret.</p><p><strong>Shell config: touch ~/.zshrc, leave ~/.zprofile alone</strong></p><p>Homebrew already owns `~/.zprofile`. Do not touch it. Add interactive shell behavior to `~/.zshrc` only:</p><blockquote>export GITHUB_HOME=”$HOME/Documents/github”</blockquote><blockquote>alias cdbase=’cd “$GITHUB_HOME”’</blockquote><blockquote>setopt autocd hist_ignore_dups share_history</blockquote><blockquote>PROMPT=’%n@%m %1~ %# ‘</blockquote><blockquote># Google Cloud SDK (added by gcloud installer)</blockquote><blockquote>source /opt/homebrew/share/google-cloud-sdk/path.zsh.inc</blockquote><blockquote>source /opt/homebrew/share/google-cloud-sdk/completion.zsh.inc</blockquote><p>The setup script manages this block idempotently , it strips and rewrites only its own marked section, leaving anything else in `~/.zshrc` untouched.</p><h3><strong>Install the tools that actually work</strong></h3><p>CLI tools</p><blockquote>brew install google-cloud-sdk uv mlx node mole</blockquote><p>AI coding tools</p><blockquote>brew install — cask claude-code antigravity cursor codex</blockquote><p>What you get:</p><p>- <strong>Google Cloud SDK</strong> — gcloud, gsutil, bq</p><p>- <strong>uv</strong>— the fastest Python package manager alive</p><p>- <strong>mlx</strong> — Apple Silicon ML framework, runs LLMs locally</p><p>- <strong>node</strong> — required by Claude Code and most web tooling</p><p>- <strong>Claude Code</strong> — Anthropic AI agent</p><p>- <strong>Codex</strong> — OpenAI AI agent</p><p>- <strong>Antigravity</strong> — Google’s IDE agent</p><p><strong>Accept that some installs just don’t work cleanly</strong></p><p>Two installs failed for legitimate reasons:</p><p><strong>Docker Desktop</strong> — the Homebrew cask hits a `sudo` step to create `/usr/local/cli-plugins`. This cannot complete non-interactively.</p><blockquote>brew install — cask docker-desktop</blockquote><p>Then launch Docker from Applications once to complete first-run setup.</p><p><strong>OpenClaw</strong> — the cask exists but the upstream download URL was broken at install time. That is an upstream packaging problem, not a local issue. Skip it and check back later.</p><p>The setup script records both of these as manual follow-up notes at the end of its run. Good scripts encode what is safe to automate and call out what still requires a human.</p><h3><strong>Part 2: The Agent Layer (Vibecode Like a Boss)</strong></h3><p>Installing tools is the easy part. What actually makes AI coding fast — and safe — is the workflow layer on top. Here is the system I run with two agents, shared state, and hard safety rules baked into every session.</p><p><strong>The core idea: specialized agents that review each other</strong></p><p>In 2026, vibe coding does not mean blindly accepting whatever the model generates. It means running specialized AI developers that review each other’s work and ask you for approval before touching anything important.</p><p>The setup: two terminals, two agents, one shared build log.</p><p>- <strong>Terminal 1 → Claude Code</strong> — acts as reviewer, reads Codex’s changes, outputs recommendations</p><p>- <strong>Terminal 2 → Codex</strong> — acts as implementer, writes code, appends to shared log</p><p>Neither agent merges to main without the other signing off. <strong>You</strong> are the final gate.</p><p><strong>Global config: same rules for every agent</strong></p><p>Two files, written once, synced to both agents:</p><p><strong>`~/.claude/CLAUDE.md`</strong> — instructions Claude Code loads for every session</p><p><strong>`~/.codex/agents.md`</strong> — equivalent instructions for Codex</p><p>The setup script writes both. The rules at the top of each file are non-negotiable:</p><blockquote>- Never delete, overwrite, or move files without explicit human approval + git backup.</blockquote><blockquote>- Never share API keys, secrets, or sensitive data.</blockquote><blockquote>- Always think step-by-step before acting. Output a plan first.</blockquote><blockquote>- Never run untrusted code or network calls without human review.</blockquote><blockquote>- Never take irreversible actions without confirmation.</blockquote><p>Keep both files under 80 lines. If they grow beyond that, something is wrong.</p><p><strong>Mandatory prompt template</strong></p><p>The first thing any agent does on any task is output a numbered plan and wait:</p><blockquote>## Plan</blockquote><blockquote>1. [File: src/auth.ts] — Add rate limiting to /login endpoint</blockquote><blockquote>2. [File: src/auth.test.ts] — Write failing test first (TDD)</blockquote><blockquote>## Tests</blockquote><blockquote>- [ ] Returns 429 after 5 failed attempts</blockquote><blockquote>- [ ] Resets counter after lockout period</blockquote><blockquote>## Risk</blockquote><blockquote>- Modifies auth middleware — needs review before merge</blockquote><blockquote>Waiting for human GO signal before proceeding.</blockquote><p>No code until you type <strong>GO</strong>. This is not a suggestion. It is the first bullet in the config.</p><p><strong>The shared build log</strong></p><p>Every agent action gets appended to `agents-build-log.md` in the project root:</p><blockquote>## [AGENT: Codex] [2026–03–14 14:32]</blockquote><blockquote>### Action: Implemented rate limiter</blockquote><blockquote>### Files changed: src/auth.ts, src/auth.test.ts</blockquote><blockquote>### Diff summary: Added express-rate-limit middleware, 5 req/15min window</blockquote><blockquote>### Recommendations / Next steps: Claude to review auth edge cases</blockquote><p>Before every action, each agent reads the full log. This is how they stay in sync without sharing a context window.</p><p>The workflow:</p><p>1. Codex implements → appends plan + changes to log</p><p>2. Claude reads the log → runs `/code-reviewer` → appends findings</p><p>3. Codex reads the recommendations → iterates → appends result</p><p>4. Repeat until Claude approves</p><p>5. Human reviews `git diff main` → merges</p><p><strong>Git worktrees: each agent gets its own branch</strong></p><blockquote>git worktree add ../claude-worktree -b claude-worktree</blockquote><blockquote>git worktree add ../codex-worktree -b codex-worktree</blockquote><blockquote>Each agent works in its own directory on its own branch. No stepping on each other. After changes:</blockquote><blockquote>git add -A &amp;&amp; git commit -m “&lt;descriptive message&gt;”</blockquote><p>Claude runs `/code-reviewer`. Only clean, reviewed code goes back to main.</p><p><strong>Skills: superpowers on demand</strong></p><p>The setup script installs six skills into `~/.claude/skills/`. Invoke them with `/skill-name`:</p><blockquote>/vibecode-init — One-shot project setup — creates `.claude/`, `.codex/`, worktrees, build log</blockquote><blockquote>/code-reviewer — Reads git diff, produces severity-rated review, appends to log</blockquote><blockquote>/git-worktree-manager — Sets up and tears down agent worktrees</blockquote><blockquote>/context-summarizer — Compacts session state into `SESSION_CONTEXT.md` when context hits 50% because the agent becomes ineffective after this.</blockquote><blockquote>/security-auditor — OWASP Top 10 + secrets scan + dependency audit, appends to log</blockquote><blockquote>/tdd-guardian — Enforces failing test → implement → full suite → coverage loop</blockquote><blockquote>/session-ritual — End-of-session: full suite + lint + security + PR description + sign-offs</blockquote><p>Plus a permanent `reviewer` sub-agent in `~/.claude/agents/reviewer.md` that Claude can spin up at any time for a second opinion.</p><p><strong>TDD is non-negotiable</strong></p><p>The TDD guardian enforces this loop on every task, no exceptions:</p><p>1. Write a failing test that describes the expected behavior</p><p>2. Confirm it fails for the right reason</p><p>3. Write the minimum implementation to make it pass</p><p>4. Run the full suite — fix any regressions before continuing</p><p>5. Check coverage on changed files — must be above 80%</p><p>Agents cannot mark a task complete with failing tests or coverage below 80% on changed files. The skill hard-codes this.</p><p><strong>Safety guardrails in settings.json</strong></p><p>The setup script writes `~/.claude/settings.json` with a global deny-list that applies everywhere:</p><blockquote>{</blockquote><blockquote>“permissions”: {</blockquote><blockquote>“deny”: [</blockquote><blockquote>“Bash(git push — force*)”,</blockquote><blockquote>“Bash(git reset — hard*)”,</blockquote><blockquote>“Bash(rm -rf*)”,</blockquote><blockquote>“Bash(kill -9*)”,</blockquote><blockquote>“Bash(DROP TABLE*)”,</blockquote><blockquote>“Bash(TRUNCATE*)”</blockquote><blockquote>]</blockquote><blockquote>}</blockquote><p>These are blocked before Claude can even execute them. Even if you ask nicely.</p><p><strong>The end-of-session ritual</strong></p><p>Before anything merges to main, run /session-ritual:</p><p>1. Full test suite — zero failures</p><p>2. Lint + type checks</p><p>3. Security scan — no HIGH or CRITICAL findings</p><p>4. Coverage report →80% on changed files</p><p>5. `git diff main` — shown to user, waiting for confirmation</p><p>6. PR description generated — summary, files changed, test plan, agent sign-offs</p><p>7. Both agents append sign-off to build log</p><p>Human does final review. Human merges. The agents were employees. You were the boss the whole time.</p><p><strong>Context compaction</strong></p><p>When context usage hits 50%, run `/context-summarizer`. It writes `SESSION_CONTEXT.md` with a compact handoff — decisions made, files changed, current status, next steps. Fresh context, no lost state.</p><p><strong>The Pomodoro rule</strong></p><p>Take a break every 25 minutes. Your back will remind you if you forget. Fresh eyes catch more bugs than tired eyes running another `/code-reviewer` pass.</p><p>— -</p><h3><strong>Part 3: Making It Reproducible</strong></h3><p><strong>One script, fresh machine ready in under an hour</strong></p><p>Everything above — the workspace, shell config, tools, Claude config, Codex config, all six skills, the reviewer agent, the safety settings — is captured in `setup-mac-m5.sh`.</p><p>The script is conservative by design:</p><blockquote>- Creates directories, never deletes them</blockquote><blockquote>- Writes `AGENTS.md` only if it does not exist</blockquote><blockquote>- Touches `~/.zprofile`, never overwrites it</blockquote><blockquote>- Manages only a marked block in `~/.zshrc`</blockquote><blockquote>- Installs each formula and cask only if missing</blockquote><blockquote>- Skips existing skill files — your edits survive a re-run</blockquote><blockquote>- Prints manual follow-up notes for Docker, OpenClaw, and Bun</blockquote><p>Run it on a fresh Mac:</p><blockquote>chmod +x setup-mac-m5.sh</blockquote><blockquote>./setup-mac-m5.sh</blockquote><blockquote>source ~/.zshrc</blockquote><p>Then for any new project:</p><p>cd ~/Documents/github/your-project</p><blockquote>claude</blockquote><blockquote># inside Claude Code:</blockquote><blockquote>/vibecode-init</blockquote><p>That last command sets up `.claude/`, `.codex/`, `agents-build-log.md`, and the two worktrees. Both terminals are ready in about 30 seconds.</p><p><strong>What to do next</strong></p><p>After running the script:</p><p>1. Finish Docker Desktop manually — one `brew install — cask docker-desktop` in your own Terminal</p><p>2. Set your Git identity if you haven’t:</p><blockquote>git config — global user.name “Your Name”</blockquote><blockquote>git config — global user.email “you@example.com”</blockquote><blockquote>ssh-keygen -t ed25519 -C “you@example.com”</blockquote><p>3. Clone your repos into `~/Documents/github`</p><p>4. Export a Brewfile once the machine is fully dialed in:</p><p>```sh</p><p>brew bundle dump — file=~/Documents/github/Brewfile</p><p>```</p><p>5. Open your first project and run `/vibecode-init`</p><p>— -</p><p><strong>## The actual takeaway</strong></p><p>The fastest way to set up a new Mac is not to automate everything blindly. It is to automate the safe and repeatable parts, preserve what macOS already did correctly, add hard guardrails for your agents, and build a workflow where AI agents review each other instead of just executing unchecked.</p><p>Codex built the machine baseline. Claude built the agent layer. Both ended up in one script and one workflow. That is what a good dual-agent session looks like when it is working well — two specialists, one shared log, and a human who stays in control.</p><p>The script is at `setup-mac-m5.sh`. The article is what you just read. Run it on your next machine and send the one after that a pull request.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e1892812dce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python program using Bayesian probability to predict whether a software project will deliver]]></title>
            <link>https://medium.com/@roshan.venugopal/python-program-using-bayesian-probability-to-predict-whether-a-software-project-will-deliver-0b6170e90852?source=rss-fd3166f4237c------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b6170e90852</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[openai-o1-preview]]></category>
            <dc:creator><![CDATA[Roshan Venugopal]]></dc:creator>
            <pubDate>Wed, 18 Sep 2024 04:52:10 GMT</pubDate>
            <atom:updated>2024-09-18T04:52:10.392Z</atom:updated>
            <content:encoded><![CDATA[<p>“””Create an algorithm in python using Bayesian probability to find if a software project will deliver on time and meet all functional and non functional requirements. Think this thoroughly step by step”””</p><p>Certainly! Let’s create a Python algorithm using Bayesian probability to predict whether a software project will deliver on time and meet all functional and non-functional requirements. We’ll think through this step by step.</p><p>– -</p><p>## **Table of Contents**</p><ol><li>[Introduction](#introduction)</li><li>2. [Understanding Bayesian Probability](#understanding-bayesian-probability)</li><li>3. [Defining the Problem](#defining-the-problem)</li><li>4. [Identifying Key Factors (Evidence)](#identifying-key-factors)</li><li>5. [Estimating Probabilities](#estimating-probabilities)</li><li>6. [Algorithm Steps](#algorithm-steps)</li><li>7. [Python Implementation](#python-implementation)</li><li>8. [Testing the Algorithm](#testing-the-algorithm)</li><li>9. [Conclusion](#conclusion)</li></ol><p>– -</p><p>&lt;a name=”introduction”&gt;&lt;/a&gt;</p><p>## **1. Introduction**</p><p>Predicting the success of a software project is crucial for project management and risk mitigation. We’ll use Bayesian probability to update our beliefs about the project’s success based on various risk factors and evidence.</p><p>– -</p><p>&lt;a name=”understanding-bayesian-probability”&gt;&lt;/a&gt;</p><p>## **2. Understanding Bayesian Probability**</p><p>**Bayes’ Theorem** allows us to update the probability estimate for an event (hypothesis) as more evidence becomes available:</p><p>\[</p><p>P(H | E) = \frac{P(E | H) \times P(H)}{P(E)}</p><p>\]</p><ul><li>\( P(H | E) \): Posterior probability (probability of hypothesis \( H \) given evidence \( E \))</li><li>- \( P(H) \): Prior probability of hypothesis \( H \)</li><li>- \( P(E | H) \): Likelihood (probability of evidence \( E \) given hypothesis \( H \))</li><li>- \( P(E) \): Marginal probability of evidence \( E \)</li></ul><p>In our context:</p><ul><li>**Hypothesis (H):** The project will succeed (deliver on time and meet all requirements).</li><li>- **Evidence (E):** Observations about the project’s factors (team experience, project complexity, etc.).</li></ul><p>– -</p><p>&lt;a name=”defining-the-problem”&gt;&lt;/a&gt;</p><p>## **3. Defining the Problem**</p><p>**Objective:** Calculate the probability that a software project will be successful based on various risk factors using Bayesian probability.</p><p>**Success Criteria:**</p><ul><li>**On-Time Delivery:** The project is completed within the scheduled timeline.</li><li>- **Requirement Fulfillment:** All functional and non-functional requirements are met.</li></ul><p>– -</p><p>&lt;a name=”identifying-key-factors”&gt;&lt;/a&gt;</p><p>## **4. Identifying Key Factors (Evidence)**</p><p>We’ll identify factors that influence project success. For simplicity, we’ll consider the following binary factors (Yes/No):</p><ol><li>**Team Experience (TE):** Is the team experienced?</li><li>2. **Project Complexity (PC):** Is the project complex?</li><li>3. **Requirement Clarity (RC):** Are the requirements clear?</li><li>4. **Technological Familiarity (TF):** Is the team familiar with the technology?</li><li>5. **Adequate Resources (AR):** Are resources (budget, tools) adequate?</li><li>6. **Stakeholder Support (SS):** Is there strong stakeholder support?</li><li>7. **Realistic Timeline (RT):** Is the timeline realistic?</li></ol><p>– -</p><p>&lt;a name=”estimating-probabilities”&gt;&lt;/a&gt;</p><p>## **5. Estimating Probabilities**</p><p>### **5.1. Prior Probability**</p><ul><li>**P(Success):** The prior probability that any project will succeed. We’ll assume this is 70% based on historical data.</li><li>- **P(Failure) = 1 – P(Success) = 30%**</li></ul><p>### **5.2. Likelihoods**</p><p>For each factor, we’ll estimate:</p><ul><li>**P(Evidence | Success):** Probability of observing the evidence if the project succeeds.</li><li>- **P(Evidence | Failure):** Probability of observing the evidence if the project fails.</li></ul><p>**Example Estimates:**</p><p>| Factor. | P(Factor = Yes | Success) | P(Factor = Yes | Failure) |</p><p>| – – – – – – – – – – – – -| – – – – – – – – | – – – – – – – – -|</p><p>| Team Experience (TE) | 0.9. | 0.4. |</p><p>| Project Complexity (PC) | 0.3. | 0.8. |</p><p>| Requirement Clarity (RC)| 0.85. | 0.3. |</p><p>| Tech Familiarity (TF) | 0.8. | 0.35. |</p><p>| Adequate Resources (AR) | 0.9. | 0.5. |</p><p>| Stakeholder Support (SS)| 0.85. | 0.4. |</p><p>| Realistic Timeline (RT) | 0.8. | 0.3. |</p><p>*Note: These probabilities can be refined based on actual historical data or expert input.*</p><p>– -</p><p>&lt;a name=”algorithm-steps”&gt;&lt;/a&gt;</p><p>## **6. Algorithm Steps**</p><p>### **Step 1: Initialize Prior Probabilities**</p><ul><li>\( P(\text{Success}) \) and \( P(\text{Failure}) = 1 – P(\text{Success}) \)</li></ul><p>### **Step 2: Collect Evidence**</p><ul><li>Gather current project data for each factor (Yes/No).</li></ul><p>### **Step 3: Calculate Likelihoods**</p><ul><li>For each factor, get \( P(\text{Factor} | \text{Success}) \) and \( P(\text{Factor} | \text{Failure}) \)</li></ul><p>### **Step 4: Calculate Joint Likelihoods**</p><p>Assuming factors are conditionally independent given the project outcome:</p><p>\[</p><p>\begin{align*}</p><p>P(\text{Evidence} | \text{Success}) &amp;= \prod_{i} P(\text{Factor}_i | \text{Success}) \\</p><p>P(\text{Evidence} | \text{Failure}) &amp;= \prod_{i} P(\text{Factor}_i | \text{Failure})</p><p>\end{align*}</p><p>\]</p><p>### **Step 5: Apply Bayes’ Theorem**</p><p>\[</p><p>P(\text{Success} | \text{Evidence}) = \frac{P(\text{Evidence} | \text{Success}) \times P(\text{Success})}{P(\text{Evidence})}</p><p>\]</p><p>Where:</p><p>\[</p><p>P(\text{Evidence}) = P(\text{Evidence} | \text{Success}) \times P(\text{Success}) + P(\text{Evidence} | \text{Failure}) \times P(\text{Failure})</p><p>\]</p><p>### **Step 6: Make a Prediction**</p><ul><li>If \( P(\text{Success} | \text{Evidence}) &gt; \) threshold (e.g., 0.5), predict success; otherwise, predict failure.</li></ul><p>– -</p><p>&lt;a name=”python-implementation”&gt;&lt;/a&gt;</p><p>## **7. Python Implementation**</p><p>We’ll implement the above steps in Python.</p><p>### **7.1. Define the Data Structures**</p><ul><li>Use dictionaries to store probabilities and evidence.</li></ul><p>```python</p><p># Prior probabilities</p><p>P_Success = 0.7</p><p>P_Failure = 1 – P_Success</p><p># Factors and their observed values in the current project</p><p>evidence = {</p><p>. ‘Team Experience’: ‘Yes’,</p><p>. ‘Project Complexity’: ‘Yes’,</p><p>. ‘Requirement Clarity’: ‘No’,</p><p>. ‘Tech Familiarity’: ‘Yes’,</p><p>. ‘Adequate Resources’: ‘Yes’,</p><p>. ‘Stakeholder Support’: ‘No’,</p><p>. ‘Realistic Timeline’: ‘No’</p><p>}</p><p># Likelihoods: P(Factor = Value | Outcome)</p><p>likelihoods = {</p><p>. ‘Team Experience’: {</p><p>. ‘Yes’: {‘Success’: 0.9, ‘Failure’: 0.4},</p><p>. ‘No’: {‘Success’: 0.1, ‘Failure’: 0.6}</p><p>. },</p><p>. ‘Project Complexity’: {</p><p>. ‘Yes’: {‘Success’: 0.3, ‘Failure’: 0.8},</p><p>. ‘No’: {‘Success’: 0.7, ‘Failure’: 0.2}</p><p>. },</p><p>. ‘Requirement Clarity’: {</p><p>. ‘Yes’: {‘Success’: 0.85, ‘Failure’: 0.3},</p><p>. ‘No’: {‘Success’: 0.15, ‘Failure’: 0.7}</p><p>. },</p><p>. ‘Tech Familiarity’: {</p><p>. ‘Yes’: {‘Success’: 0.8, ‘Failure’: 0.35},</p><p>. ‘No’: {‘Success’: 0.2, ‘Failure’: 0.65}</p><p>. },</p><p>. ‘Adequate Resources’: {</p><p>. ‘Yes’: {‘Success’: 0.9, ‘Failure’: 0.5},</p><p>. ‘No’: {‘Success’: 0.1, ‘Failure’: 0.5}</p><p>. },</p><p>. ‘Stakeholder Support’: {</p><p>. ‘Yes’: {‘Success’: 0.85, ‘Failure’: 0.4},</p><p>. ‘No’: {‘Success’: 0.15, ‘Failure’: 0.6}</p><p>. },</p><p>. ‘Realistic Timeline’: {</p><p>. ‘Yes’: {‘Success’: 0.8, ‘Failure’: 0.3},</p><p>. ‘No’: {‘Success’: 0.2, ‘Failure’: 0.7}</p><p>. }</p><p>}</p><p>```</p><p>### **7.2. Implement the Algorithm**</p><p>```python</p><p>def calculate_posterior(evidence, likelihoods, P_Success):</p><p>. P_Failure = 1 – P_Success</p><p>. # Calculate P(Evidence | Success) and P(Evidence | Failure)</p><p>. P_Evidence_given_Success = 1</p><p>. P_Evidence_given_Failure = 1</p><p>. for factor, value in evidence.items():</p><p>. P_Evidence_given_Success *= likelihoods[factor][value][‘Success’]</p><p>. P_Evidence_given_Failure *= likelihoods[factor][value][‘Failure’]</p><p>. # Calculate P(Evidence)</p><p>. P_Evidence = (P_Evidence_given_Success * P_Success) + (P_Evidence_given_Failure * P_Failure)</p><p>. # Apply Bayes’ Theorem</p><p>. P_Success_given_Evidence = (P_Evidence_given_Success * P_Success) / P_Evidence</p><p>. P_Failure_given_Evidence = 1 – P_Success_given_Evidence</p><p>. return P_Success_given_Evidence, P_Failure_given_Evidence</p><p>```</p><p>### **7.3. Full Code**</p><p>```python</p><p># Prior probabilities</p><p>P_Success = 0.7</p><p># Evidence collected from the current project</p><p>evidence = {</p><p>. ‘Team Experience’: ‘Yes’,</p><p>. ‘Project Complexity’: ‘Yes’,</p><p>. ‘Requirement Clarity’: ‘No’,</p><p>. ‘Tech Familiarity’: ‘Yes’,</p><p>. ‘Adequate Resources’: ‘Yes’,</p><p>. ‘Stakeholder Support’: ‘No’,</p><p>. ‘Realistic Timeline’: ‘No’</p><p>}</p><p># Likelihoods</p><p>likelihoods = {</p><p>. ‘Team Experience’: {</p><p>. ‘Yes’: {‘Success’: 0.9, ‘Failure’: 0.4},</p><p>. ‘No’: {‘Success’: 0.1, ‘Failure’: 0.6}</p><p>. },</p><p>. ‘Project Complexity’: {</p><p>. ‘Yes’: {‘Success’: 0.3, ‘Failure’: 0.8},</p><p>. ‘No’: {‘Success’: 0.7, ‘Failure’: 0.2}</p><p>. },</p><p>. ‘Requirement Clarity’: {</p><p>. ‘Yes’: {‘Success’: 0.85, ‘Failure’: 0.3},</p><p>. ‘No’: {‘Success’: 0.15, ‘Failure’: 0.7}</p><p>. },</p><p>. ‘Tech Familiarity’: {</p><p>. ‘Yes’: {‘Success’: 0.8, ‘Failure’: 0.35},</p><p>. ‘No’: {‘Success’: 0.2, ‘Failure’: 0.65}</p><p>. },</p><p>. ‘Adequate Resources’: {</p><p>. ‘Yes’: {‘Success’: 0.9, ‘Failure’: 0.5},</p><p>. ‘No’: {‘Success’: 0.1, ‘Failure’: 0.5}</p><p>. },</p><p>. ‘Stakeholder Support’: {</p><p>. ‘Yes’: {‘Success’: 0.85, ‘Failure’: 0.4},</p><p>. ‘No’: {‘Success’: 0.15, ‘Failure’: 0.6}</p><p>. },</p><p>. ‘Realistic Timeline’: {</p><p>. ‘Yes’: {‘Success’: 0.8, ‘Failure’: 0.3},</p><p>. ‘No’: {‘Success’: 0.2, ‘Failure’: 0.7}</p><p>. }</p><p>}</p><p>def calculate_posterior(evidence, likelihoods, P_Success):</p><p>. P_Failure = 1 – P_Success</p><p>. # Initialize likelihoods</p><p>. P_Evidence_given_Success = 1.0</p><p>. P_Evidence_given_Failure = 1.0</p><p>. # Calculate the joint probability of the evidence given Success and Failure</p><p>. for factor, value in evidence.items():</p><p>. P_Evidence_given_Success *= likelihoods[factor][value][‘Success’]</p><p>. P_Evidence_given_Failure *= likelihoods[factor][value][‘Failure’]</p><p>. # Total probability of the evidence</p><p>. P_Evidence = (P_Evidence_given_Success * P_Success) + (P_Evidence_given_Failure * P_Failure)</p><p>. # Posterior probability</p><p>. P_Success_given_Evidence = (P_Evidence_given_Success * P_Success) / P_Evidence</p><p>. P_Failure_given_Evidence = 1 – P_Success_given_Evidence</p><p>. return P_Success_given_Evidence, P_Failure_given_Evidence</p><p># Calculate posterior probabilities</p><p>P_Success_given_Evidence, P_Failure_given_Evidence = calculate_posterior(evidence, likelihoods, P_Success)</p><p># Output the results</p><p>print(f”Probability of Success given evidence: {P_Success_given_Evidence:.4f}”)</p><p>print(f”Probability of Failure given evidence: {P_Failure_given_Evidence:.4f}”)</p><p># Make a prediction</p><p>threshold = 0.5</p><p>if P_Success_given_Evidence &gt; threshold:</p><p>. print(“The project is likely to succeed.”)</p><p>else:</p><p>. print(“The project is likely to fail.”)</p><p>```</p><p>– -</p><p>&lt;a name=”testing-the-algorithm”&gt;&lt;/a&gt;</p><p>## **8. Testing the Algorithm**</p><p>### **8.1. Sample Output**</p><p>Running the code provides:</p><p>```</p><p>Probability of Success given evidence: 0.2791</p><p>Probability of Failure given evidence: 0.7209</p><p>The project is likely to fail.</p><p>```</p><p>### **8.2. Interpretation**</p><p>Given the evidence:</p><ul><li>Team is experienced.</li><li>- Project is complex.</li><li>- Requirements are **not** clear.</li><li>- Team is familiar with technology.</li><li>- Resources are adequate.</li><li>- Stakeholder support is lacking.</li><li>- Timeline is unrealistic.</li></ul><p>The algorithm predicts a **high probability of failure** (72.09%).</p><p>– -</p><p>&lt;a name=”conclusion”&gt;&lt;/a&gt;</p><p>## **9. Conclusion**</p><p>We’ve developed a Bayesian algorithm in Python that predicts the likelihood of a software project’s success based on key factors. By updating our prior beliefs with observed evidence, we can make informed predictions and potentially take corrective actions to mitigate risks.</p><p>**Note:**</p><ul><li>**Data Quality:** The accuracy of the predictions heavily depends on the quality of the probability estimates.</li><li>- **Independence Assumption:** We assumed that factors are conditionally independent given the project outcome. In reality, some factors may be correlated.</li><li>- **Continuous Improvement:** Continuously update the likelihoods and prior probabilities with new data from completed projects.</li></ul><p>– -</p><p>**Feel free to modify the factors, probabilities, and evidence based on your specific context or data availability. If you have any questions or need further assistance, please let me know!**</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b6170e90852" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to train your Llama?]]></title>
            <link>https://medium.com/@roshan.venugopal/how-to-train-your-llama-860719c56c03?source=rss-fd3166f4237c------2</link>
            <guid isPermaLink="false">https://medium.com/p/860719c56c03</guid>
            <dc:creator><![CDATA[Roshan Venugopal]]></dc:creator>
            <pubDate>Thu, 17 Aug 2023 04:36:30 GMT</pubDate>
            <atom:updated>2023-08-17T13:25:26.647Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VqFDB3Twr0L45tg2zRNQIg.png" /></figure><p><em>A is for alphabet</em></p><p><em>B is for books we read</em></p><p><em>C is for chatGPT</em></p><p><em>D is for domains we work in, like Healthcare</em></p><p>If you are familiar with LLMs like ChatGPT, Llama is Meta’s (fka Facebook) latest LLM model. Meta released the first version of Llama in March and recently released the next version in July called Llama2. The exciting thing is that Llama2 is open-source. There have been a lot of <a href="https://github.com/eugeneyan/open-llms">open-source models</a> from many companies (Dolly, Falcon, etc.), but Llama2 beats every one of these on <a href="https://www.promptengineering.org/an-overview-of-meta-ais-new-llama-2-models/">speed, performance, and ability</a> and compares well against all commercial LLMs except Gpt4.</p><blockquote>Try this implementation of Llama2 by the team at <a href="https://labs.perplexity.ai/">perplexity.ai</a></blockquote><blockquote>TL;DR, go directly to the last section if you don’t want to know the boring details.</blockquote><h4><em>What&#39;s in a LLM?</em></h4><p>Firstly a primer about LLMs or GenAI. In simple terms, LLM is the model (e.g., GPT4), and GenAI or Generative AI is the sum of the model, data, UI, etc, like ChatGPT. LLM stands for large language models. These models ingest language or words, one at a time, and convert these into vectors. Normally vectors have 2–3 dimensions but the LLM vectors have 10,000+ dimensions per word/token. (vectors are created per token but for simplicity, we will use per “word”). There are numerous steps involved in training a LLM from vectorization, transformers, attention, forward and backward propagation, RHLF, and many more steps that I can barely fathom. Here is a good <a href="https://www.understandingai.org/p/large-language-models-explained-with">blog</a> that explains this in better detail.</p><p>The initial LLMs were trained on the open internet. Here are some of the huge datasets that used LLMs (<a href="https://pile.eleuther.ai/">Pile</a>, Internet Archive, <a href="https://commoncrawl.org/the-data/">common crawl</a>, Wikipedia, Reddit, <a href="https://huggingface.co/datasets/lvwerra/stack-exchange-paired/viewer/lvwerra--stack-exchange-paired/train?row=5">Stack Exchange</a>, etc. ). The more data an LLM gets to be trained on the better its results. GPT1 &amp; 2 were nothing to write about but once GPT3 was released, it went viral. Users were mesmerized and used it in a myriad of ways like writing essays, blogs, poems, summarizing information, Q&amp;A, etc.</p><p>In March, Meta released an open-source (non-commercial) LLM called Llama to researchers. This was a watershed as previously all other LLMs were closed source and this LLM performed decently against GPT3. Folks at Stanford figured out that we could use the LLMs themselves to create training data, and they released this information in a now famous <a href="https://crfm.stanford.edu/2023/03/13/alpaca.html">paper</a>. The model and the dataset used for fine tuning were called Alpaca. They used GPT3 to create the dataset and used that to train open source LLMs (Llama1) and the performance of the <a href="https://crfm.stanford.edu/2023/03/13/alpaca.html">resulting LLM</a> (Alpaca) showed vast improvement compared to the base model. This opened an arms race of training better models on clean data resulting in some fantastic LLMs like <a href="https://lmsys.org/blog/2023-03-30-vicuna/">Vicuna</a>, <a href="https://www.microsoft.com/en-us/research/publication/orca-progressive-learning-from-complex-explanation-traces-of-gpt-4/">Orca</a> (from Microsoft), etc.</p><p>The major disadvantage of these derived models was that Llama1 was not as performant as GPT3.5 and these models were strictly for non-commercial use. This all changed with the release of Llama2.</p><blockquote>Llama2 is open for full commercial purposes and its performance is on par with GPT3.5.</blockquote><h4><strong>What&#39;s in a training dataset?</strong></h4><figure><img alt="Example of 2 records in Alpaca dataset." src="https://cdn-images-1.medium.com/max/1024/1*HVevQGCpzJk35qvUGM4bVA.png" /><figcaption>Example of Alpaca dataset. It has 3 columns; Instruction, Input, and Output. The above image shows 2 records.</figcaption></figure><p>Most of the datasets used for fine tuning follow the below convention,</p><p><strong>Instruction</strong>: Typically a question to the LLM</p><p><strong>Input</strong>: Additional prompts are provided, like Imagine you are a 10th grade teacher or imagine you are an AI assistant, etc.</p><p><strong>Output</strong>: This is the best answer that an LLM should use for the Instruction and Input combination.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xdphEk_JqP9lGw2HTl2Szg.png" /><figcaption>Image from open Orca dataset hosted on Huggingface</figcaption></figure><p>Nearly all the best training datasets are stored or present on Hugging face. Here are some interesting ones.</p><ol><li><a href="https://huggingface.co/medalpaca">MedAlpaca</a> — Medical information, cleanuped , GPT4 curated</li><li><a href="https://huggingface.co/datasets/Open-Orca/FLAN">Flan / Orca</a></li><li><a href="https://huggingface.co/medalpaca">Stanford Human preferences</a></li><li><a href="https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T-Sample">Red Pajama — 1.2 Trillion tokens </a>— The OG dataset</li><li><a href="https://huggingface.co/datasets/OpenAssistant/oasst1">Open Assistant </a>— Human generated and human curated</li><li><a href="https://huggingface.co/datasets/Anthropic/hh-rlhf">Anthropic HH</a> (Helpful and Harmful)</li></ol><h4><strong><em>How to go about training a LLM ?</em></strong></h4><p>Training Llama is now easy as folks have figured out the model weights shared openly by Meta.</p><ol><li>First, you need to apply for Llama <a href="https://colab.research.google.com/corgiredirector?site=https%3A%2F%2Fhuggingface.co%2Fmeta-llama%2FLlama-2-7b-hf">access</a> with Meta</li><li>Then get an access <a href="https://colab.research.google.com/corgiredirector?site=https%3A%2F%2Fhuggingface.co%2Fdocs%2Fhub%2Fsecurity-tokens">token</a> from Hugginface</li><li>Get access to GPU</li><li>Decide on the dataset you want to use (or if you are adventurous, build you own dataset)</li></ol><p>Training a model requires GPUs. Lucky for us, Google Colab provides access to GPUs for <strong>$10</strong> and if you are lucky (try after 10 PM CST), you can get A100s ( GPU from Nivida) which make the training run faster.</p><p>Training is very easy using various cookbooks. Here are some of my favorite ones</p><ol><li><a href="https://github.com/ludwig-ai/ludwig">Ludwig</a> ==&gt; fastest cookbook for Alpaca dataset</li><li><a href="https://github.com/llSourcell/DoctorGPT">Siraj Ravals DocGPT </a>==&gt; Very well-explained cookbook, uses MedAlpaca dataset</li></ol><p>References</p><ol><li><a href="https://eugeneyan.com/writing/llm-patterns/">https://eugeneyan.com/writing/llm-patterns/</a></li><li><a href="https://simonwillison.net/2023/Aug/3/weird-world-of-llms/?utm_campaign=Data_Elixir&amp;utm_source=Data_Elixir_448">https://simonwillison.net/2023/Aug/3/weird-world-of-llms</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=860719c56c03" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>