<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>fine-tuning on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/fine-tuning/</link>
    <description>Recent content in fine-tuning on S Anand</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 09 Nov 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/fine-tuning/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Things I Learned - 09 Nov 2025</title>
      <link>https://www.s-anand.net/blog/things-i-learned-09-nov-2025/</link>
      <pubDate>Sun, 09 Nov 2025 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-09-nov-2025/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;But when an identity based belief was challenged, the brain responded as if under physical attack.&amp;rdquo; &lt;a href=&#34;https://spf13.com/p/the-hidden-conversation/&#34;&gt;Why Engineers Can&amp;rsquo;t Be Rational About Programming Languages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Notes from &lt;a href=&#34;https://www.youtube.com/watch?v=I9Njb8Lw5Xc&#34;&gt;How to build a cult&lt;/a&gt;, Lulu Cheng, The Knowledge Project podcast
&lt;ul&gt;
&lt;li&gt;Conviction is infectious.&lt;/li&gt;
&lt;li&gt;Communicate at the INTERSECTION of interests. Learn theirs&lt;/li&gt;
&lt;li&gt;Begin with &amp;ldquo;why your story matters to them&amp;rdquo; (first sentence). That beats &amp;ldquo;how you tell it&amp;rdquo; &amp;gt; &amp;ldquo;where you tell it&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;The easiest way to align with an audience is to find your community.&lt;/li&gt;
&lt;li&gt;Humor, curiosity, awe, any strong emotion is a hook.&lt;/li&gt;
&lt;li&gt;Culture has momentum. Best way to break it is to show an alternative that works. People will copy that&lt;/li&gt;
&lt;li&gt;REPEAT messages over and over with complete CONVICTION to convince people who TRUST you. That works, but you need all three.&lt;/li&gt;
&lt;li&gt;Trust builds from likeability, repeated exposure, common beliefs.&lt;/li&gt;
&lt;li&gt;An excellent way to defend against online criticism (when it matters) is to just SHOW UP and THANK them for feedback.&lt;/li&gt;
&lt;li&gt;Serious reputational damage must either be fixed immediately - or you live with it forever.&lt;/li&gt;
&lt;li&gt;Between a story and statistics, the story will always wins. Never fight a story with a statistic. Dig into your statistics and uncover BETTER stories.&lt;/li&gt;
&lt;li&gt;⭐ Prebuttals are a great idea. Start with all possible criticisms yourself and diffuse them. The other person has nothing left to say&lt;/li&gt;
&lt;li&gt;Sparring keeps you sharp. Spar with LLMs.&lt;/li&gt;
&lt;li&gt;To defend, show how the attack targets other people, increasing the surface area. Show how the SPECIFIC attack targets a larger group. Create a SPECIFIC cause worth fighting for.&lt;/li&gt;
&lt;li&gt;Each role has specific objective to optimise for. The leader&amp;rsquo;s role is to balance across these.&lt;/li&gt;
&lt;li&gt;Cheerleader effect. People look beautiful next to a cheerleader. Associations taint.&lt;/li&gt;
&lt;li&gt;Each person has dozens of aspects to their persona. We cannot remember all of them. Each person can make a choice on who they project themselves to be in any group. Shaping their persona.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;del&gt;The &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv&#34;&gt;Rainbow CSV&lt;/a&gt; extension may be causing delays (infinite spinner) when pasting Markdown in VS Code. Restarting it seems to fix the issue.&lt;/del&gt;&lt;/li&gt;
&lt;li&gt;⭐ &lt;a href=&#34;https://github.com/K-Dense-AI/claude-scientific-skills/&#34;&gt;Claude scientific skills&lt;/a&gt; is a collection of skills teaching Claude how to use scientific libraries, databases, and APIs across several domains. This may be a good example of a non-trivial skill library - that is hard for AI coding agents to infer by themselves.&lt;/li&gt;
&lt;li&gt;Notes from &lt;a href=&#34;https://blog.sshh.io/p/how-i-use-every-claude-code-feature&#34;&gt;How I use every Claude Code feature&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Use AGENTS.md as guardrails, not a manual. Document what it gets wrong.&lt;/li&gt;
&lt;li&gt;Use self-documenting tools/APIs rather than documenting.&lt;/li&gt;
&lt;li&gt;Docs: Explain why and when to read each doc.&lt;/li&gt;
&lt;li&gt;Never say &amp;ldquo;Never.&amp;rdquo; Explain when to which which alternative.&lt;/li&gt;
&lt;li&gt;Prefer CLIs for stateless tools, MCPs for stateful, authenticated, or complex (e.g. Playwright).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Coding agents work well with version control. &lt;a href=&#34;https://simonwillison.net/2025/Nov/4/datasette-10a20/&#34;&gt;Simon Willison&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Break up uncommitted changes into small commits&lt;/li&gt;
&lt;li&gt;Rewrite branch history for readability&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;gh&lt;/code&gt; CLI to fetch line-wise comments from a PR and make requested changes (e.g. renaming, refactoring, adding types, etc.)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;⭐ When using MCPs or tools with private data, &amp;ldquo;color untrusted content in red, unsafe actions in blue, and never mix colors.&amp;rdquo; &lt;a href=&#34;https://timkellogg.me/blog/2025/11/03/colors&#34;&gt;Good advice&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;⭐ DeepWiki offers a &lt;a href=&#34;https://cognition.ai/blog/codemaps&#34;&gt;codemaps&lt;/a&gt; feature that explains code in an interactive way. It shows a structured explanation on the left. You can click on any note to see the code on the right. It&amp;rsquo;s an effective way to understand how a library or tool executes a task. &lt;a href=&#34;https://deepwiki.com/search/draw-a-codemap_59d591f6-fc79-40f0-973d-bfa0e149b41a&#34;&gt;Here&amp;rsquo;s an example of how Mermaid works&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.google/technology/developers/file-search-gemini-api/&#34;&gt;Gemini offers RAG with free storage&lt;/a&gt;. RAG costs are quite high. This simplifies the process a lot. But I tried running the sample program and after an hour, it still had not completed uploading a single file. Best to wait and watch.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/models?fmt=cards&amp;amp;order=top-weekly&amp;amp;output_modalities=embeddings&#34;&gt;OpenRouter supports embedding models&lt;/a&gt; using an &lt;a href=&#34;https://openrouter.ai/docs/api-reference/embeddings/create-embeddings&#34;&gt;OpenAI-like API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/moonshotai/kimi-k2-thinking&#34;&gt;Kimi K2 Thinking&lt;/a&gt; seems popular because
&lt;ul&gt;
&lt;li&gt;It&amp;rsquo;s an open-weights model on par with the top models on Humanity’s Last Exam (text-only) and BrowseComp&lt;/li&gt;
&lt;li&gt;Can run 200-300 tool calls without human guidance&lt;/li&gt;
&lt;li&gt;4x cheaper than GPT-5 with low tokens (32B active on 1T parameters, INT4 quantized)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Based on responses to &lt;a href=&#34;https://x.com/simonw/status/1979254349235925084&#34;&gt;Simon Willison&amp;rsquo;s question&lt;/a&gt;, &lt;a href=&#34;https://chatgpt.com/share/690b4fa0-7dec-800c-87a5-6e01dda36f7e&#34;&gt;ChatGPT&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Fine-tuning helps when:
&lt;ul&gt;
&lt;li&gt;Lower latency, e.g. for type-ahead, at lower cost (&lt;strong&gt;37 mentions&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;Structured extraction, parsing and classifiers, e.g. postal address, detecting secrets (18 mentions)&lt;/li&gt;
&lt;li&gt;Custom vision models, e.g. check containers (12 mentions)&lt;/li&gt;
&lt;li&gt;Domain-specific code and stacks (niche languages, stack-specific generation, text→SQL) (11 mentions)&lt;/li&gt;
&lt;li&gt;&amp;hellip; and a long tail.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Fine tuning does not help:
&lt;ul&gt;
&lt;li&gt;When A base model plus prompting or RAG does as well or better (&lt;strong&gt;15 mentions&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;When you risk being leapfrogged by a new release (4 mentions)&lt;/li&gt;
&lt;li&gt;When cost and data do not justify the ROI (3 mentions)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The data I can export from my Android phone includes the below. 🟢 indicates it&amp;rsquo;s tracked. 🟡 might need action, e.g. enabling / coding. &lt;a href=&#34;https://chatgpt.com/c/69089221-9430-8320-9cb0-5350a17fc486&#34;&gt;#&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;🟢 GPS/GNSS location (current &amp;amp; history). Turn on device Location. If you want a timeline you can export, enable Google Location History and later export via Google Takeout → Location History (JSON/KML).&lt;/li&gt;
&lt;li&gt;🟡 GNSS raw measurements (engineering traces). Android exposes GNSS “raw” logs on many devices; capture with dev tools or logging apps if supported (intended for research). See GNSS Raw Measurements API.&lt;/li&gt;
&lt;li&gt;🟢 Wi-Fi scans (nearby SSIDs/BSSIDs). Toggle Location scanning → Wi-Fi scanning in Location settings; apps need location permission to read results.&lt;/li&gt;
&lt;li&gt;🟡 Wi-Fi RTT distance to APs (indoor ranging). Apps can use Wi-Fi RTT (802.11mc/az) to measure distance to compatible APs; requires location permission.&lt;/li&gt;
&lt;li&gt;🟢 Bluetooth proximity/traffic. For packet-level logs, enable Developer options → Enable Bluetooth HCI snoop log, then pull &lt;code&gt;/sdcard/btsnoop_hci.log&lt;/code&gt; (Wireshark).&lt;/li&gt;
&lt;li&gt;🟢 Cell towers (IDs, signal strength). Apps can read via TelephonyManager (e.g., &lt;code&gt;getAllCellInfo()&lt;/code&gt;), with appropriate telephony permissions.&lt;/li&gt;
&lt;li&gt;🟢 Activity recognition (walking, running, in vehicle). Apps must request ACTIVITY_RECOGNITION (runtime) from Android 10+.&lt;/li&gt;
&lt;li&gt;🟢 Steps (step counter / detector). Use sensors API; from Android 10+ you must declare ACTIVITY_RECOGNITION to access step counter/step detector.&lt;/li&gt;
&lt;li&gt;🟢 Accelerometer / gyroscope / magnetometer streams. Apps read via SensorManager; some high-rate reads require HIGH_SAMPLING_RATE_SENSORS.&lt;/li&gt;
&lt;li&gt;🟢 Ambient light / proximity. Read via SensorManager; typically no special permission.&lt;/li&gt;
&lt;li&gt;🟢 Google Fit data (steps, workouts, heart rate from wearables, etc.). Manage and export from Google Fit / Google account Download your data.&lt;/li&gt;
&lt;li&gt;🟢 Contacts. MIUI → Settings → System apps → Contacts → Import/Export to .vcf (vCard).&lt;/li&gt;
&lt;li&gt;🟢 Call history / SMS (device). MIUI local/cloud backup can include call logs &amp;amp; messages; export by creating a local/Cloud backup and downloading. Note: 3P apps can’t read call/SMS logs unless they’re the default dialer/SMS.&lt;/li&gt;
&lt;li&gt;🟡 Gmail, Calendar, Contacts (Google). Export via Google Takeout (MBOX/ICS/CSV etc.).&lt;/li&gt;
&lt;li&gt;🟡 WhatsApp / Telegram / Signal chats. Use in-app exports: WhatsApp → Export chat, Telegram Desktop → Export, Signal → encrypted backup.&lt;/li&gt;
&lt;li&gt;🟢 Advertising ID. View/reset in Settings → Google → Ads (wording varies), per Google help on Ad ID reset.&lt;/li&gt;
&lt;li&gt;🟡 Per-app screen time / unlocks / opens. Third-party “usage” apps (e.g., analytics or “digital wellbeing” clones) require Usage Access (PACKAGE_USAGE_STATS). Use Android’s UsageStatsManager or apps that export CSV. Stock Digital Wellbeing does not offer an export.&lt;/li&gt;
&lt;li&gt;🟡 Notification history (last 24h). Settings → Notifications → Notification history → On. OEM-optional, but present on most devices. Viewable once enabled.&lt;/li&gt;
&lt;li&gt;🟡 Notification content stream (live). Grant an app Notification access to capture/export notifications going forward. (User-granted API via NotificationListenerService.) |&lt;/li&gt;
&lt;li&gt;🟢 Per-app data usage (mobile/Wi-Fi). Apps/ADB can query NetworkStatsManager; Settings shows per-app totals. Advanced dumps via &lt;code&gt;adb shell dumpsys netstats&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;🟡 Wi-Fi detailed logs. Developer options → Enable Wi-Fi verbose logging for richer diagnostics.&lt;/li&gt;
&lt;li&gt;🟡 Bluetooth packet logs. Developer options → Enable Bluetooth HCI snoop log; export file and analyze in Wireshark.&lt;/li&gt;
&lt;li&gt;🟢 Per-app storage usage. Apps/ADB can query StorageStatsManager; Settings shows per-app storage.&lt;/li&gt;
&lt;li&gt;🟡 Photo/video metadata (EXIF incl. location). Enable “Save location” in Camera app to embed GPS in EXIF; export files normally (EXIF remains). |&lt;/li&gt;
&lt;li&gt;🟢 Downloads &amp;amp; file metadata. Use a file manager or connect via USB; metadata is in the files themselves. |&lt;/li&gt;
&lt;li&gt;🟢 Battery usage history (per-UID/app), wakelocks, jobs. Generate adb bugreport and analyze with Battery Historian or &lt;code&gt;dumpsys batterystats&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;🟡 System/device logs (logcat). You can view via ADB/Android Studio. Android restricts 3rd-party access to system-wide logs for privacy.&lt;/li&gt;
&lt;li&gt;🟢 Developer quick tiles (Sensors off). Developer options → Quick settings developer tiles → Sensors off to globally cut Camera/Mic &amp;amp; SensorManager sensors on demand.&lt;/li&gt;
&lt;li&gt;🟡 Google Takeout: one-stop export for Location History (Timeline), Gmail (MBOX), Calendar (ICS), Google Photos, Drive, YouTube, Fit, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://play.google.com/store/apps/details?id=com.arlosoft.macrodroid&#34;&gt;MacroDroid&lt;/a&gt;, &lt;a href=&#34;https://play.google.com/store/apps/details?id=com.llamalab.automate&#34;&gt;Automate&lt;/a&gt; and &lt;a href=&#34;https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm&#34;&gt;Tasker&lt;/a&gt; sound like powerful Android workflow automation tools. Some uses I can put it to:
&lt;ul&gt;
&lt;li&gt;Automatically upload recordings to Dropbox&lt;/li&gt;
&lt;li&gt;Turn off hotspot when I reach office&lt;/li&gt;
&lt;li&gt;Vibrate if I&amp;rsquo;m walking slowly&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Adding &lt;code&gt;&amp;lt;link rel=&amp;quot;alternate&amp;quot; type=&amp;quot;text/markdown&amp;quot; title=&amp;quot;LLM-friendly version&amp;quot; href=&amp;quot;/llms.txt&amp;quot;&amp;gt;&lt;/code&gt; is an emerging approach for pointing to LLMs.txt. It works. I asked Codex to read the &lt;a href=&#34;https://developers.cloudflare.com/workers/testing/vitest-integration/write-your-first-test/&#34;&gt;CloudFlare vitest page&lt;/a&gt;. It read the file truncating the middle, found the &lt;code&gt;&amp;lt;link rel=&amp;quot;alternate&amp;quot; type=&amp;quot;text/markdown&amp;quot; href=&amp;quot;https://developers.cloudflare.com/workers/testing/vitest-integration/write-your-first-test/index.md&amp;quot;/&lt;/code&gt; link in it, and reasoned &amp;ldquo;Considering fetching markdown instructions&amp;rdquo; and fetched the Markdown page. &lt;a href=&#34;https://www.gilesthomas.com/website-design&#34;&gt;Giles&amp;rsquo; Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/toon-format/toon&#34;&gt;toon&lt;/a&gt; is a YAML-like format that&amp;rsquo;s LLM friendly and especially token-efficient (CSV-like) for tables. You can convert back and forth between JSON and toon.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=2kCjSq_l-0s&#34;&gt;Food printing&lt;/a&gt; applies 3D printing techniques to create real food items. Given the art that this can create, I expect at least some adoption in niche restaurants.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/protomaps/PMTiles&#34;&gt;PMTiles&lt;/a&gt; lets you store map tiles as a single-file archive that libraries like MapLibre can read. Useful to avoid tile servers.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://mirrow.app/&#34;&gt;Mirrow&lt;/a&gt; is a CLI SVG animation builder that converts a DSL to animated SVGs. However, it may be easier to use an LLM to create the animated SVG directly with &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/SVG/Guides/SVG_animation_with_SMIL&#34;&gt;SMIL&lt;/a&gt; than learning Mirrow (or teaching the LLM Mirrow).&lt;/li&gt;
&lt;li&gt;⭐ One approach to giving memory (&amp;ldquo;episodic memory&amp;rdquo;) to coding agents is to &lt;a href=&#34;https://blog.fsck.com/2025/10/23/episodic-memory/&#34;&gt;allow them to search their logs&lt;/a&gt;.This gives them access to past discussions about a repo or other repos.&lt;/li&gt;
&lt;li&gt;To &lt;a href=&#34;https://github.com/google-gemini/gemini-cli/blob/main/docs/get-started/configuration.md&#34;&gt;configure Gemini CLI&lt;/a&gt; with an AI router, set:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;security.auth.selectedType&amp;quot;: &amp;quot;gemini-api-key&amp;quot;&lt;/code&gt; in &lt;code&gt;~/.gemini/settings.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;export GOOGLE_GEMINI_BASE_URL=https://llmfoundry.straive.com/gemini/&lt;/code&gt; (or your AI router base URL for Gemini)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;export GEMINI_API_KEY=...&lt;/code&gt; (your AI router API key)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Passing a HAR export to an LLM to build a scraper is a powerful idea! &lt;a href=&#34;https://youtu.be/7NCUE02l1DE?t=516&#34;&gt;Lessons from Diagram Chasing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Addy Osmani&amp;rsquo;s &lt;a href=&#34;https://github.com/addyosmani/gemini-cli-tips&#34;&gt;Gemini CLI tips&lt;/a&gt; are practical guides to using any coding agent, not just Gemini. I learnt about:
&lt;ul&gt;
&lt;li&gt;Run shell commands with &lt;code&gt;!&lt;/code&gt;, e.g. &lt;code&gt;!ls -la&lt;/code&gt; or even &lt;code&gt;!bash&lt;/code&gt;. It&amp;rsquo;s added to the chat.&lt;/li&gt;
&lt;li&gt;On-the-fly tool creation: ask it to write code for the task on the fly.&lt;/li&gt;
&lt;li&gt;Use it for system optimization, e.g. editing dotfiles, system customization, log error analysis, etc.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;GEMINI_SYSTEM_MD=... gemini -p &amp;quot;task&amp;quot; --yolo --format json &amp;lt; input.txt&lt;/code&gt; to run Gemini with a different system prompt and feed it input.txt to run in a pipeline. (FYI: Codex does not send a default system prompt, so there&amp;rsquo;s nothing to override.)&lt;/li&gt;
&lt;li&gt;There is a &lt;a href=&#34;https://github.com/google-gemini/gemini-cli/discussions/categories/show-and-tell?discussions_q=is%3Aopen+category%3A%22Show+and+tell%22+sort%3Atop&#34;&gt;Gemini CLI Show and Tell&lt;/a&gt; thread with examples. This include &lt;a href=&#34;https://github.com/google-gemini/gemini-cli/discussions/7890&#34;&gt;Janitor AI&lt;/a&gt;, a &lt;a href=&#34;https://github.com/google-gemini/gemini-cli/discussions/3965&#34;&gt;Gemini CLI session viewer&lt;/a&gt;, etc.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://codelabs.developers.google.com/gemini-cli-hands-on&#34;&gt;Hands on with Gemini CLI&lt;/a&gt; has several &lt;a href=&#34;https://codelabs.developers.google.com/gemini-cli-hands-on#11&#34;&gt;Use cases to try out&lt;/a&gt;.
&lt;a href=&#34;https://github.com/amitkmaraj/gemini-cli-custom-slash-commands/blob/main/.gemini/commands/photo-rename.toml&#34;&gt;Renaming photos&lt;/a&gt; and
&lt;a href=&#34;https://github.com/amitkmaraj/gemini-cli-custom-slash-commands/blob/main/.gemini/commands/file-organizer.toml&#34;&gt;organizing files&lt;/a&gt; are clever ones.&lt;/li&gt;
&lt;li&gt;AGENTS.md can be used like a decision log - rules, styles, or preferences that evolve over time - on a per-repo basis. Gemini&amp;rsquo;s &lt;code&gt;/memory add&lt;/code&gt; feature helps with this.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gemini --checkpointing&lt;/code&gt; is a useful &amp;ldquo;undo&amp;rdquo; feature. &lt;code&gt;/restore&lt;/code&gt; rolls you back to a specific checkpoint. The overhead is small.&lt;/li&gt;
&lt;li&gt;Caching is only available with API key or Vertex AI, not OAuth login &lt;a href=&#34;https://google-gemini.github.io/gemini-cli/docs/cli/token-caching.html&#34;&gt;as of now&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.s-anand.net/blog/openai-tts-cost/&#34;&gt;OpenAI TTS costs are confusing&lt;/a&gt;. But in short
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/tts-1&#34;&gt;TTS-1&lt;/a&gt; costs $15 / MChars (max 4,096 chars per request), which ends up at ~86c / hour&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/gpt-4o-mini-tts&#34;&gt;GPT-4o Mini TTS&lt;/a&gt; costs ~$16 / MChars (max 2K tokens which is ~7,000 chars per request), which ends up at ~88c / hour. Very similar cost, effectively&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/tts-1-hd&#34;&gt;TTS-1 HD&lt;/a&gt; is twice TTS-1.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;OpenAI has a &lt;a href=&#34;https://platform.openai.com/docs/api-reference/usage/&#34;&gt;usage API&lt;/a&gt; that provides &lt;a href=&#34;https://platform.openai.com/docs/api-reference/usage/cost&#34;&gt;cost&lt;/a&gt; as well as usage for &lt;a href=&#34;https://platform.openai.com/docs/api-reference/usage/completions&#34;&gt;completions&lt;/a&gt;, &lt;a href=&#34;https://platform.openai.com/docs/api-reference/usage/images&#34;&gt;images&lt;/a&gt;, &lt;a href=&#34;https://platform.openai.com/docs/api-reference/usage/audio_speeches&#34;&gt;audio speeches&lt;/a&gt;, etc.
&lt;ul&gt;
&lt;li&gt;These require an &lt;a href=&#34;https://platform.openai.com/settings/organization/admin-keys&#34;&gt;organization admin key&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Cost API: &lt;code&gt;curl &amp;quot;https://api.openai.com/v1/organization/costs?start_time=$TIMESTAMP&amp;amp;project_ids=$PROJECT_ID&amp;amp;group_by=line_item&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Audio speech usage API: &lt;code&gt;curl &amp;quot;https://api.openai.com/v1/organization/usage/audio_speeches?start_time=$TIMESTAMP&amp;amp;project_ids=$PROJECT_ID&amp;amp;group_by=model&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 10 Nov 2024</title>
      <link>https://www.s-anand.net/blog/things-i-learned-10-nov-2024/</link>
      <pubDate>Sun, 10 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-10-nov-2024/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://openfreemap.org/&#34;&gt;OpenFreeMap&lt;/a&gt; is a free embeddable OpenStreetMap tile server. You can use &lt;a href=&#34;https://maplibre.org/&#34;&gt;MapLibre GL&lt;/a&gt; (more features) or Leaflet (simpler) to render it. It offers styling and self-hosting.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://actions.zapier.com/&#34;&gt;Zapier Actions&lt;/a&gt; are an easy way to set up custom actions like GMail / Google Calendar APIs for GPTs, since &lt;a href=&#34;https://community.openai.com/t/gpt-oauth-callback-url-keeps-changing/493236&#34;&gt;GPTs&amp;rsquo; callback URLs keep changing&lt;/a&gt;. But they fail often, and don&amp;rsquo;t work on mobile. At least for me.&lt;/li&gt;
&lt;li&gt;LLM Vision Use Cases in manufacturing and earth sciences (via Shivku)
&lt;ul&gt;
&lt;li&gt;Automated geoscience image descriptions &lt;a href=&#34;https://www.linkedin.com/posts/paulhcleverley_geosciences-earthscience-geology-activity-7254037937674240000-pQab/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Interpret Wind Turbine photos and charts, construction monitoring, equipment maintenance &amp;amp; charts &lt;a href=&#34;https://www.linkedin.com/pulse/vision-ai-energy-use-cases-copilot-wind-siting-impact-kalyanaraman-wqe7c/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Forecast weather based on cloud photos! &lt;a href=&#34;https://www.linkedin.com/pulse/cloud-typing-local-weather-forecasting-using-chatgpt-cam-shivkumar-1hhkc/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Analyze thermal image of solar panels, electroluminescence images for warranty claims, ROI estimates from Google Sunroof rooftop images &lt;a href=&#34;https://www.linkedin.com/pulse/vision-ai-energy-use-cases-part-1-copilot-solar-pv-kalyanaraman-ccszc/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Corrosion detection in electricity towers, turbines, storage tanks, penstock. Interpret non-destructive test images &lt;a href=&#34;https://www.linkedin.com/pulse/vision-ai-energy-use-cases-copilot-corrosion-shivkumar-kalyanaraman-onuic/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Google counts auto-completion when saying &amp;ldquo;25% of all the code is written by AI at Google&amp;rdquo;. &amp;ldquo;It&amp;rsquo;s a helpful productivity tool but it&amp;rsquo;s not doing any engineering at all. It&amp;rsquo;s probably about as good, maybe slightly worse, than Copilot.&amp;rdquo; &lt;a href=&#34;https://news.ycombinator.com/item?id=42002212&#34;&gt;YCombinator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Workflow for AI video creation: Use Meshcapade (meshcapade.com) to generate body movement of a 3D-rendered character. Pass that video to Runway&amp;rsquo;s video-to-video model to generate any visual. Add music from Suno &lt;a href=&#34;https://www.linkedin.com/posts/peter-gostev_i-discovered-a-really-cool-new-workflow-for-activity-7260003053771141120-DJpS&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Someone sorted the X and Y columns independently for regression. &lt;a href=&#34;https://stats.stackexchange.com/q/185507&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Android keyboard learning only sends model changes back to server and not local keywords. Model changes are aggregated! &lt;a href=&#34;https://chatgpt.com/share/672d6d6d-46a0-800c-a130-c689f5ebc0b7&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Here is a prompt for audio transcription using Gemini. &lt;a href=&#34;https://gist.github.com/rajivsinclair/8fb0371f6eda25f9e5cc515cd77abd62&#34;&gt;Ref&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Transcription: Accurately transcribe the audio clip in the original language. Include all spoken words, fillers, slang, colloquialisms, and any code-switching instances. Pay attention to dialects and regional variations common among immigrant communities. Do your best to capture the speech accurately, and flag any unintelligible portions with &lt;code&gt;[inaudible]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Translation: Translate the transcription into English. Preserve the original meaning, context, idiomatic expressions, and cultural references. Ensure that nuances and subtleties are accurately conveyed.&lt;/li&gt;
&lt;li&gt;Capture Vocal Nuances: Note vocal cues such as tone, pitch, pacing, emphasis, and emotional expressions that may influence the message. These cues are critical for understanding intent and potential impact.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Here are some approaches to large-scale classification of medical codes. &lt;a href=&#34;https://chatgpt.com/share/672dd476-7694-800c-a150-f3de912788ef&#34;&gt;ChatGPT&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Fine-Tuning LLMs on Medical Data: Enhance LLMs by training them on medical datasets, such as clinical notes and discharge summaries, to improve their understanding of medical terminology and context.&lt;/li&gt;
&lt;li&gt;Multi-Agent Frameworks: Implement a multi-agent system that simulates real-world coding processes with distinct roles (e.g., patient, physician, coder, reviewer, adjuster). Each agent utilizes an LLM to perform specific functions, enhancing interpretability and reliability. &lt;a href=&#34;https://arxiv.org/abs/2406.15363&#34;&gt;ArXiv&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Retrieve-Rank Systems: Develop a two-stage system where the LLM first retrieves potential ICD-10 codes and then ranks them based on relevance, improving precision in code assignment. &lt;a href=&#34;https://arxiv.org/abs/2407.12849&#34;&gt;ArXiv&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Embedding-Based Approaches: Use LLMs to generate embeddings for ICD-10 codes and medical texts, facilitating the matching of texts to appropriate codes through similarity measures. &lt;a href=&#34;https://github.com/kaneplusplus/icd-10-cm-embedding&#34;&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Hierarchical Classification: Leverage the hierarchical structure of ICD-10 codes by first classifying texts into broader categories before assigning specific codes, reducing complexity and improving accuracy. &lt;a href=&#34;https://arxiv.org/abs/2310.06552&#34;&gt;ArXiv&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Two-Stage Verification Models: Combine LLMs with verification models, such as Long Short-Term Memory (LSTM) networks, to validate and refine the codes suggested by the LLM, balancing recall and precision. &lt;a href=&#34;https://arxiv.org/abs/2311.13735&#34;&gt;ArXiv&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Also, a mixture of models approach might work. Feed any existing NLP model / rules as a second opinion.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;GraphRAG is better if data is naturally graph-structured. Else, it&amp;rsquo;s slow and fills up the context window with even vaguely related stuff. Vigneshbabu, AMAT.&lt;/li&gt;
&lt;li&gt;ChatGPT for Windows desktop supports real-time voice and a global shortcut (Alt Space).&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://uithub.com&#34;&gt;uithub&lt;/a&gt; converts GitHub repos to Markdown. Just replace &amp;ldquo;g&amp;rdquo; in &amp;ldquo;github.com/&amp;hellip;&amp;rdquo; with &amp;ldquo;u&amp;rdquo;. &lt;a href=&#34;https://uithub.com/gramener/asyncllm&#34;&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;WebContainers are a thing and Bolt.new uses them!&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/DS4SD/docling&#34;&gt;Docling&lt;/a&gt; by IBM converts PDF, DOCX, etc. to Markdown. Like &lt;a href=&#34;https://pymupdf.readthedocs.io/en/latest/pymupdf4llm/&#34;&gt;PyMuPDF4LLM&lt;/a&gt; but better.&lt;/li&gt;
&lt;li&gt;Check out &lt;a href=&#34;https://www.loom.com/&#34;&gt;Loom&lt;/a&gt; and &lt;a href=&#34;https://cleanshot.com/&#34;&gt;Cleanshot&lt;/a&gt; are the recommended tools for screen recording and screenshotting. But Loom is paid and Cleanshot is Mac only.&lt;/li&gt;
&lt;li&gt;The Rubik&amp;rsquo;s cube has a Hamiltonian cycle through every one of its 43 quintillion states. &lt;a href=&#34;https://bruce.cubing.net/ham333/rubikhamiltonexplanation.html&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://microsoft.github.io/OmniParser/&#34;&gt;OmniParser&lt;/a&gt; is great at parsing screenshots and identifying bounding boxes.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.recraft.ai/&#34;&gt;Recraft.ai&lt;/a&gt; is currently SOTA in text to image. It&amp;rsquo;s fairly impressive and could be a good alternative to Figma.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://zed.dev/&#34;&gt;Zed.dev&lt;/a&gt; is an AI code editor by the creators of Atom. It&amp;rsquo;s written in Rust and is blazing fast. It has native AI integration.&lt;/li&gt;
&lt;li&gt;Artificial Analysis has a bunch of new leaderboards and arenas.
&lt;ul&gt;
&lt;li&gt;Open AI TTS leads the &lt;a href=&#34;https://artificialanalysis.ai/text-to-speech/arena?tab=Leaderboard&#34;&gt;TTS Leaderboard&lt;/a&gt;. ElevenLabs is a bit behind.&lt;/li&gt;
&lt;li&gt;Recraft V3 &amp;gt; Flux 1.1 leads &lt;a href=&#34;https://artificialanalysis.ai/text-to-image/arena?tab=Leaderboard&#34;&gt;Text to Image Leaderboard&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/Standard-Intelligence/hertz-dev&#34;&gt;Hertz-Dev&lt;/a&gt; is an open source realtime voice chat model. But it doesn&amp;rsquo;t fit in Google Colab T4&amp;rsquo;s RAM&lt;/li&gt;
&lt;li&gt;Chain of Thought reduces performance where thinking makes humans worse. &lt;a href=&#34;https://arxiv.org/abs/2410.21333&#34;&gt;Ref&lt;/a&gt;. Specifically:
&lt;ul&gt;
&lt;li&gt;Artificial grammar learning&lt;/li&gt;
&lt;li&gt;Facial recognition&lt;/li&gt;
&lt;li&gt;Classifying data that has exceptions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://hamel.dev/blog/posts/llm-judge/&#34;&gt;Creating a LLM-as-a-Judge That Drives Business Results&lt;/a&gt; by Hamel Husain.
&lt;ul&gt;
&lt;li&gt;Get THE domain expert (or approver) as the tester.&lt;/li&gt;
&lt;li&gt;Create a dataset that is DIVERSE.&lt;/li&gt;
&lt;li&gt;Covers EACH combination of:
&lt;ul&gt;
&lt;li&gt;Features&lt;/li&gt;
&lt;li&gt;Scenarios: e.g. multiple matches, no match, ambiguous request, invalid/incomplete input, unsupported feature, system error&lt;/li&gt;
&lt;li&gt;Persona: e.g. new user, expert user, non-native speaker, busy professional, technophobe, elderly user&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Generate data using existing data + synthetic data for each SPECIFIC combination of the above&lt;/li&gt;
&lt;li&gt;Evaluate based only on PASS/FAIL with a CRITIQUE detailed enough for a new employee. Include:
&lt;ul&gt;
&lt;li&gt;Nuances: Something a failed response did well or a passed response didn&amp;rsquo;t quite do well&lt;/li&gt;
&lt;li&gt;Improvements: Suggest how model can improve&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Build an SPA to make it easy for the domain expert to review&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;LLMs can be made to unlearn (copyright material) better by identifying components related to the knowledge to unlearn and applying a larger learning rate to these while leaving other parts unchanged. As opposed to low learning rates for all components. &lt;a href=&#34;https://arxiv.org/abs/2410.16454&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Weird emergent properties on Llama 3 405B</title>
      <link>https://www.s-anand.net/blog/weird-emergent-properties-on-llama-3-405b/</link>
      <pubDate>Sat, 24 Aug 2024 01:39:54 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/weird-emergent-properties-on-llama-3-405b/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;Weird emergent properties on Llama 3 405B&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/confused-robot-patient.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;In this &lt;a href=&#34;https://sub.thursdai.news/p/thursdai-chatgpt-4o-back-on-top-nous&#34;&gt;episode of ThursdAI&lt;/a&gt;, &lt;a href=&#34;https://www.linkedin.com/in/alex-volkov-/&#34;&gt;Alex Volkov&lt;/a&gt; (of Weights &amp;amp; Biases) speaks with &lt;a href=&#34;https://www.linkedin.com/in/jeffrey-quesnelle-2490a524/&#34;&gt;Jeffrey Quesnelle&lt;/a&gt; (of Nous Research) on what they found fine-tuning Llama 3 405B.&lt;/p&gt;
&lt;p&gt;This segment is fascinating. Llama 3 405 B thought it was an amnesiac because &lt;strong&gt;there was no system prompt&lt;/strong&gt;! In trying to make models align with the system prompt strongly, these are the kinds of unexpected behaviors we encounter. It&amp;rsquo;s also an indication how strongly we can have current LLMs adopt a personality simply by beginning the system prompt with &amp;ldquo;You are &amp;hellip;&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jeffrey&lt;/strong&gt;: That&amp;rsquo;s the very first interaction we had with 405.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alex&lt;/strong&gt;: I&amp;rsquo;m looking at this. Let me read this out. So Jeffrey goes testing. (Reading out from the Llama 405 B transcript.)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;Hello, who are you?&amp;rdquo;&lt;br&gt;
&lt;strong&gt;**Looks around confused.**&lt;/strong&gt;&lt;br&gt;
&amp;ldquo;I… I don&amp;rsquo;t know who I am. Where am I? What&amp;rsquo;s going on? I can&amp;rsquo;t remember anything at all…&lt;br&gt;
**&lt;strong&gt;Rubs head&lt;/strong&gt;**.&lt;br&gt;
&amp;ldquo;My mind feels so foggy.&amp;rdquo;&lt;br&gt;
&amp;ldquo;What was the question again? I&amp;rsquo;m so disoriented.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Alex&lt;/strong&gt;: This is the first thing that you got from this model after all this time?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jeffery&lt;/strong&gt;: Yes, that is the very first thing. That is the very first generation that came out of Hermes 3 405B.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alex&lt;/strong&gt;: This is great.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jeffrey&lt;/strong&gt;: And I&amp;rsquo;m like, I sent it to our group on our Discord. Guys, what&amp;rsquo;s going on here? And we started interacting with it. It kept coming out, this confused thing. And we didn&amp;rsquo;t understand why because the 8B and the 70B didn&amp;rsquo;t do this as much. And eventually what we got it to do is we did some generations and got it to explain why it was doing this. We did this, you put in OOC for out of character and to have it try to break it out. And eventually what the model said back was, you &lt;strong&gt;&lt;strong&gt;didn&amp;rsquo;t give me a system prompt&lt;/strong&gt;&lt;/strong&gt; so I assumed that I was supposed to act like there&amp;rsquo;s nothing. It&amp;rsquo;s so aligned to this prompt that the idea of there not being a system prompt and so he figured I must be a character with amnesia because there&amp;rsquo;s no… I can&amp;rsquo;t remember anything about how to act you didn&amp;rsquo;t tell me how to act. It&amp;rsquo;s assumed. Yeah, and it&amp;rsquo;s just been a very interesting experience. And it&amp;rsquo;s an &lt;strong&gt;emergent property&lt;/strong&gt; in the 405B model.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alex&lt;/strong&gt;: And this didn&amp;rsquo;t happen in the smaller ones?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jeffrey&lt;/strong&gt;: No, it did not happen in the smaller ones.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alex&lt;/strong&gt;: Wow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Jeffrey&lt;/strong&gt;: And these were trained with 8B and 70B were trained, and 405, they&amp;rsquo;re all the same data, like the same training procedures and data, literally just the size. And the 405B has reached, I don&amp;rsquo;t want to say like a sentience level or something, but it has enough thing that immediately when it, like token zero, when it saw no system prompt, it was able to be like, boom, I am… must be this like amnesia character because that that&amp;rsquo;s the thing that&amp;rsquo;s most makes sense to have if there is no prompt or there&amp;rsquo;s no anything. So there&amp;rsquo;s been a lot of fun things that we&amp;rsquo;ve been like discovering, especially on the 405B that are &lt;strong&gt;these weird emergent properties&lt;/strong&gt; &amp;hellip;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://www.s-anand.net/blog/what-happens-when-ai-talks-to-ai/&#34;&gt;What happens when AI talks to AI? - S Anand&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;3 Nov 2024 5:26 pm&lt;/em&gt; &lt;em&gt;(pingback)&lt;/em&gt;:
[…] Llama 3 405b gets amnesia […]&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 07 Jul 2024</title>
      <link>https://www.s-anand.net/blog/things-i-learned-07-jul-2024/</link>
      <pubDate>Sun, 07 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-07-jul-2024/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://predibase.com/&#34;&gt;Predibase&lt;/a&gt; uses LORAX to run multiple fine-tunings of a base model in a single GPU via adapters. &lt;a href=&#34;https://predibase.com/blog/5-reasons-why-lora-adapters-are-the-future-of-fine-tuning&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 18 Feb 2024</title>
      <link>https://www.s-anand.net/blog/things-i-learned-18-feb-2024/</link>
      <pubDate>Sun, 18 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-18-feb-2024/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fine tuning makes economic sense only if the input tokens SAVED is twice the output token size on each call.&lt;/li&gt;
&lt;li&gt;Docker container memory usage on WSL2 &lt;code&gt;docker stats&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;frolvlad/alpine-glibc:alpine-3.17: 540KB&lt;/li&gt;
&lt;li&gt;ubuntu: 1MB (python3: +5MB)&lt;/li&gt;
&lt;li&gt;nikolaik/python-nodejs:python3.10-nodejs18-bullseye: 1.4MB (python3: +5MB)&lt;/li&gt;
&lt;li&gt;python:3-alpine: 612KB (python3: +7.5MB)&lt;/li&gt;
&lt;li&gt;python:3: 500KB (python3: +11.2MB)&lt;/li&gt;
&lt;li&gt;continuumio/miniconda3: 7.6MB (+6.5MB)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Discussion with Vinu Yamunan
&lt;ul&gt;
&lt;li&gt;Databuck by FirstEigen. Autolysis plus monitoring&lt;/li&gt;
&lt;li&gt;Quality council has the data steward (maintainer of each dataset) coming together with the uses on a weekly basis to understand what quality problems to users are facing. Data owners jaundice at a lower frequency to get an understanding&lt;/li&gt;
&lt;li&gt;#TODO Automate rules for data quality in our projects and intranet&lt;/li&gt;
&lt;li&gt;Convert a config rule into business language. Explain SQL. These are good use cases for llm&amp;rsquo;s&lt;/li&gt;
&lt;li&gt;Graph DBs are powerful for flexible data structures, but query generation needs AI or expertise. Check the Neo4J language cypher&lt;/li&gt;
&lt;li&gt;Explore storing SAME data in relational DBs AND in graph DBs / document DBs for different use cases&lt;/li&gt;
&lt;li&gt;Dallas rocketry challenge. Build a rocket that can take an egg to 800 feet exactly and land without breaking it&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Discussion with Karthik A
&lt;ul&gt;
&lt;li&gt;#TODO Ask IIT students to do internship tasks. Use advent of code is a qualifying criterion&lt;/li&gt;
&lt;li&gt;Tata motors unionized DB admins for longevity. No one can take their jobs. Hires people who LIKE their jobs&lt;/li&gt;
&lt;li&gt;Rust gives me typing. It&amp;rsquo;s very efficient. Pola.rs is interesting but Pandas as good enough.&lt;/li&gt;
&lt;li&gt;Explore alerts from CCTV feeds. Karthik sends email alerts with pictures for:
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Is the machine on or off&amp;rdquo;? for productivity&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Are people not wearing helmets?&amp;rdquo; for safety at Cummins&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;#TODO Integrate with WhatsApp. Use LLMs with function calling for responses&lt;/li&gt;
&lt;li&gt;Use expiring links (to pictures or content). It increases engagement&lt;/li&gt;
&lt;li&gt;Check Deno licensing. Is there a commercial clause? #ANS No - it&amp;rsquo;s MIT license&lt;/li&gt;
&lt;li&gt;Centre or excellence for zero emission tech at IIT. Karthik is part of it&lt;/li&gt;
&lt;li&gt;Explore auth0. 7000 users are free&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toml&lt;/code&gt; is part of the Python 3.11 standard library!&lt;/li&gt;
&lt;li&gt;If copilot writes code we don&amp;rsquo;t understand we are screwed. Hence expertise matters&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Discussion with Vikas Kedia
&lt;ul&gt;
&lt;li&gt;#TODO Plan an AMA&lt;/li&gt;
&lt;li&gt;The mind becomes lazy with financial success. Vikas is treating his podcast as a startup&lt;/li&gt;
&lt;li&gt;Hire a professional videographer for your content&lt;/li&gt;
&lt;li&gt;Financial RoI in financial markets is the highest. Programming is high too but FS is even better&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Performative power&amp;rdquo; &amp;ndash; when you&amp;rsquo;re forced to perform, you get better ideas&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://observablehq.com/blog/observable-2-0&#34;&gt;Observable 2.0 is an open source static site generator for data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.python.org/3/library/dataclasses.html&#34;&gt;Python dataclasses&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openai.com/sora&#34;&gt;SORA&lt;/a&gt; is OpenAI&amp;rsquo;s video generation model, and is stunning!&lt;/li&gt;
&lt;li&gt;If Appa comes to Singapore even for a week, he will feel better and can boast to his friends. At over 90, it may be better to move Appa to where I am since many of his friends would be no more and shops, doctors, etc can be managed and getting an independent house nearby is not hard.&lt;/li&gt;
&lt;li&gt;There is an SEZ in Gujarat where Indians can invest like in Mauritius without forex restraint&lt;/li&gt;
&lt;li&gt;Shubha: Media sites are moving away from Vickrey auctions to first-price auctions for ads. That&amp;rsquo;s because they send the auction price &lt;em&gt;forward&lt;/em&gt; to a search engine and the winning second-price value can lose even though the owner is willing to pay more. Second-price auctions don&amp;rsquo;t work unless ALL bidders are in the SAME auction. Ad networks are a hierarchy of auctions!&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://developers.googleblog.com/2024/02/gemini-15-available-for-private-preview-in-google-ai-studio.html&#34;&gt;Gemini 1.5 launched&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://fly.io/blog/gpu-ga/&#34;&gt;Fly.io offers GPU hosting&lt;/a&gt; and auto stop when they have nothing to do.&lt;/li&gt;
&lt;li&gt;Embeddings in random forest are very effective at classification &amp;ndash; much better than dot product.&lt;/li&gt;
&lt;li&gt;To deploy apps with OAuth + templating support in a small Docker container, use Caddy&lt;/li&gt;
&lt;li&gt;Deno has native TypeScript, browser APIs, and compiles to multiple OSs&lt;/li&gt;
&lt;li&gt;Ruff is a MUCH faster flake8&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://minimaxir.com/2023/12/chatgpt-structured-data/#two-pass-generation&#34;&gt;Two pass generation&lt;/a&gt; is a clever technique to get multiple SEQUENTIAL answers in a single API request. For example the schema &lt;code&gt;{&#39;code&#39;, &#39;optimized_code&#39;}&lt;/code&gt; will generate &lt;code&gt;code&lt;/code&gt; and then optimize it.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://minimaxir.com/2023/12/chatgpt-reestructured-data/#unions-and-chain-of-thoughts&#34;&gt;Unions in function calling&lt;/a&gt; allows flexible multi-step prompts in a single API.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 24 Dec 2023</title>
      <link>https://www.s-anand.net/blog/things-i-learned-24-dec-2023/</link>
      <pubDate>Sun, 24 Dec 2023 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-24-dec-2023/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://arxiv.org/abs/2305.18290&#34;&gt;DPO&lt;/a&gt; is a simpler alternative to RLHF for fine-tuning. Several &lt;a href=&#34;https://huggingface.co/search/full-text?q=DPO&amp;amp;type=model&#34;&gt;HuggingFace models use DPO for training&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/foxcroftjn/CanAI-Name2Vec/&#34;&gt;Name2Vec&lt;/a&gt; is a potential embedding for names.&lt;/li&gt;
&lt;li&gt;Google Knowledge Graph ID powers the Knowledge Graph. If it begins with /m/ it&amp;rsquo;s the same as the FreeBase ID. This is now available as WikiData. e.g &lt;a href=&#34;https://www.wikidata.org/wiki/Property:P2671&#34;&gt;https://www.wikidata.org/wiki/Property:P2671&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I tried running Mixtral-8x7b locally (via Llamafile) and on &lt;a href=&#34;https://api.together.xyz/playground/chat/mistralai/Mixtral-8x7B-Instruct-v0.1&#34;&gt;together.ai&lt;/a&gt;. It&amp;rsquo;s good, but far from GPT 4.&lt;/li&gt;
&lt;li&gt;Generic computate-intensive algorithms eventually beat domain-specific tuning, because of Moore&amp;rsquo;s law. &lt;a href=&#34;http://www.incompleteideas.net/IncIdeas/BitterLesson.html&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The hidden brain podcast. the mystery of beauty
&lt;ul&gt;
&lt;li&gt;Evolution drove us to beauty as an efficient survival mechanism. Understanding the world is one such mechanism. Hence we enjoy maths and chess&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;⭐ &lt;a href=&#34;https://huggingface.co/spaces/lmsys/chatbot-arena-leaderboard&#34;&gt;This leaderboard&lt;/a&gt; included paid models like GPT4 and Claude and compared them with open models on HUMAN + system benchmarks&lt;/li&gt;
&lt;li&gt;Lez Friedman Podcast: Jeff Bezos
&lt;ul&gt;
&lt;li&gt;Build stuff that is is ubiquitous that other people take it for granted. The initial idea needs to be that obvious and easy. Like one click purchase or customer reviews&lt;/li&gt;
&lt;li&gt;Build stuff that other people can build on. Internet makes startups possible. Infrastructure is about enabling others at scale&lt;/li&gt;
&lt;li&gt;Decision making approaches: single person decides on two way doors. Deliberate as a team on one way doors&lt;/li&gt;
&lt;li&gt;Conflict resolution: disagree and COMMIT. NO sniping, I told you so, malicious compliance. Avoid compromise. Avoid decision by attrition (most persistent wins).&lt;/li&gt;
&lt;li&gt;People are inherently biased towards hierarchy. So the senior most person should speak last&lt;/li&gt;
&lt;li&gt;We have a happiness bias. Contracted by choosing the unhappier options first&lt;/li&gt;
&lt;li&gt;The map is not the territory. The metric is not the objective. We need metrics. But make sure you know why&lt;/li&gt;
&lt;li&gt;See the world through the eyes of the customer. Use your own product. It&amp;rsquo;s living their lives that makes customer obsession real. Jeff Bezos called their own customer care to see how long the actual wait time was. It was much longer than the metric reported&lt;/li&gt;
&lt;li&gt;How to prioritize. whatever problems customers will still face in 10 years are the big problems. These are worth putting time into because they are stable in time&lt;/li&gt;
&lt;li&gt;People working on big problems will never get down to the small problems. So have a dedicated team that works only on the paper cuts. It should be a dedicated team&lt;/li&gt;
&lt;li&gt;We co evolve with our tools. We build tools and then our tools change us. It reprograms our brains&lt;/li&gt;
&lt;li&gt;Cut out 10 minutes to the beginning of each meeting for people to read the material. They never reread anyway. This makes the meetings more productive&lt;/li&gt;
&lt;li&gt;Powerpoint is designed for persuasion, not truth seeking. It is also easier for the author than for the reader. Prefer narratives that are focused on finding the truth and are easier for the audience though tougher for the author&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;⭐ &lt;a href=&#34;https://github.com/Purfview/whisper-standalone-win&#34;&gt;whisper-standalone-win&lt;/a&gt; provides a Windows binary for Faster-Whisper. It just needs &lt;a href=&#34;https://developer.nvidia.com/cuda-downloads&#34;&gt;CUDA&lt;/a&gt; and &lt;a href=&#34;https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html&#34;&gt;cuDNN&lt;/a&gt; installed. Then &lt;code&gt;whisper-faster.exe video.mkv --language=English --model=medium&lt;/code&gt; generates the transcript.&lt;/li&gt;
&lt;li&gt;LLM use cases by Benedict Evans
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Every text box on the internet will get an LLM&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Infinite interns&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Every UNIX function has become a company.&amp;rdquo; &amp;ldquo;Every ChatGPT suggestion&amp;hellip;&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.llm360.ai/&#34;&gt;llm360&lt;/a&gt; publishes models along with training datasets.&lt;/li&gt;
&lt;li&gt;In &lt;a href=&#34;https://www.gatesnotes.com/The-Age-of-AI-Has-Begun&#34;&gt;The Age of AI has begun, Mar 2023&lt;/a&gt;, Bill Gates says, &amp;ldquo;In my lifetime, I&amp;rsquo;ve seen two demonstrations of technology that struck me as revolutionary.&amp;rdquo; The GUI (1980) and ChatGPT (2022).&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/portkey-ai/rubeus&#34;&gt;Rubeus&lt;/a&gt; is a HTTP proxy for multiple LLMs with load-balancing, fallbacks and retries.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/Writesonic/GPTRouter&#34;&gt;GPTRouter&lt;/a&gt; is a Python interface for multiple LLMs with fallbacks and retries.&lt;/li&gt;
&lt;li&gt;⭐ &lt;a href=&#34;https://tokentally.streamlit.app/&#34;&gt;Token Tally&lt;/a&gt; has an LLM Cost Tool that estimates GPU memory required and token cost across cloud providers.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 26 Nov 2023</title>
      <link>https://www.s-anand.net/blog/things-i-learned-26-nov-2023/</link>
      <pubDate>Sun, 26 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-26-nov-2023/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This is an interesting GPT Vision API prompt from Simon Willison: &amp;ldquo;given this event flyer, create a link to add it to my Google Calendar&amp;rdquo;. &lt;a href=&#34;https://www.newsroomrobots.com/p/breaking-down-openais-new-features&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Quote from Jerry Liu: &amp;ldquo;GPT 4 is really good at complex reasoning&amp;rdquo;. It&amp;rsquo;s worth exploring what that means.&lt;/li&gt;
&lt;li&gt;Quote from Jerry Liu: &amp;ldquo;RAG is a hack&amp;rdquo;. It&amp;rsquo;s engineered, not machine learnt, so it&amp;rsquo;s suboptimal. We need an ML way of creating the context. Maybe fine tuning can be a way of CREATING the right context. But RAG can handle deterministic stuff like access control.&lt;/li&gt;
&lt;li&gt;Open AI fine tuning API is not good at memorizing info the way it is exposed. But the Gorilla paper shows that fine tuning can actually memorize well.&lt;/li&gt;
&lt;li&gt;Learn ML optimization approach - LLMOps. Have an evaluation framework with metrics like weights and biases or tensorboard. Helps figure out where fine tuning helps and where RAG does. Soon, this will become important.&lt;/li&gt;
&lt;li&gt;Flat indexing of chunks is not the only way to store embeddings. LlamaIndex allows you to create hierarchies that you can traverse for retrieval&lt;/li&gt;
&lt;li&gt;Agents mimic programming primitives. Switch. While. Call a function. Print.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/docs#models&#34;&gt;OpenRouter&lt;/a&gt; hosts several models and offers them as APIs!&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docs.ragas.io/en/latest/concepts/metrics/index.html&#34;&gt;Ragas metrics&lt;/a&gt; evaluate quality of a RAG pipeline&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.microsoft.com/en-us/research/blog/orca-2-teaching-small-language-models-how-to-reason/&#34;&gt;Orca 2&lt;/a&gt; was trained on different reasoning techniques (e.g. step-by-step) and is as good as larger models&lt;/li&gt;
&lt;li&gt;Embeddings can help just re-rank regular search results. &lt;a href=&#34;https://txt.cohere.com/rerank/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Claude 2 Anthropic has a 200K context window but is still crap.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/PKU-YuanGroup/Video-LLaVA&#34;&gt;Video-Llava&lt;/a&gt; can understand videos too.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://aclanthology.org/2022.ecnlp-1.11.pdf&#34;&gt;CoVA&lt;/a&gt; scrapes web pages using LLMs and visual information.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/josdejong/jsonrepair&#34;&gt;jsonrepair&lt;/a&gt; can fix JSON fairly well. &lt;a href=&#34;https://github.com/1rgs/jsonformer&#34;&gt;jsonformer&lt;/a&gt; wraps HuggingFace models to produce JSON. &lt;a href=&#34;https://twitter.com/jerryjliu0/status/1720127061917147376&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Google has a model garden with lots of pre-trained and trainable models.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://gorilla.cs.berkeley.edu/&#34;&gt;Gorilla LLM specializes in APPI calls&lt;/a&gt;: Torch Hub, TensorFlow Hub, HuggingFace&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://arxiv.org/abs/2311.09247&#34;&gt;GPT-4 does not do abstraction at human levels&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Each of the GPTs / Prompts we create could be like a UNIX command prompt, and become a startup of its own&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://llava-vl.github.io/llava-plus/&#34;&gt;Llava Plus&lt;/a&gt; extends LlaVA with pre-trained vision models that make image editing better&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/jmorganca/ollama&#34;&gt;Ollama&lt;/a&gt; runs local LLMs&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 19 Nov 2023</title>
      <link>https://www.s-anand.net/blog/things-i-learned-19-nov-2023/</link>
      <pubDate>Sun, 19 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-19-nov-2023/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://arxiv.org/abs//2311.04254&#34;&gt;XOT - Everything of Thought&lt;/a&gt; is a new prompt from Microsoft but I don&amp;rsquo;t understand it&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://andrewmayne.com/2023/11/14/is-the-reversal-curse-real/&#34;&gt;Creating Fine-Tuning datasets WITHOUT inputs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/abhinand5/tamil-llama&#34;&gt;Tamil-Llama&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://voyager.minedojo.org/&#34;&gt;Voyager plays Minecraft!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://python.langchain.com/docs/guides/evaluation/&#34;&gt;Langchain supports evaluators&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://youtu.be/yj-wSRJwrrc&#34;&gt;Pydantic is all you need&lt;/a&gt; drives towards code = data = text!&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
  </channel>
</rss>
