Skip to content

Instantly share code, notes, and snippets.

View hamelsmu's full-sized avatar
💻
Always learning.

Hamel Husain hamelsmu

💻
Always learning.
View GitHub Profile
@hamelsmu
hamelsmu / fine-tuning.md
Last active March 2, 2025 03:37
From OpenAI Deep Research, in response to https://x.com/simonw/status/1895301139819860202

Success Stories of Fine-Tuning LLMs Across Industries

Below is a summary of diverse use cases where companies fine-tuned large language models (LLMs) to solve business challenges that previous methods struggled with. Each case highlights the challenge, the fine-tuning approach, and the key results achieved.

Summary of Fine-Tuning Success Cases

Use Case Key Results Source Link
Wealth Management Assistant (Finance) 98% advisor adoption; document access up from 20% to 80% OpenAI & Morgan Stanley
Insurance Claims AI (Insurance) 30% accuracy improvement vs. generic LLMs [Insurance News (EXL)](https://www.insurancenews.c
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hamelsmu
hamelsmu / html2md.py
Last active November 26, 2024 06:15
html to markdown
from html2text import HTML2Text
from textwrap import dedent
import re
def get_md(cts, extractor='h2t'):
h2t = HTML2Text(bodywidth=5000)
h2t.ignore_links,h2t.mark_code,h2t.ignore_images = (True,)*3
res = h2t.handle(cts)
def _f(m): return f'```\n{dedent(m.group(1))}\n```'
return re.sub(r'\[code]\s*\n(.*?)\n\[/code]', _f, res or '', flags=re.DOTALL).strip()
@hamelsmu
hamelsmu / follow_theirs.py
Last active November 26, 2024 14:27
"I'll have what they are having" for bluesky. The motiviation is to mimic who someone else is following who reports they are having a good experience on bluesky!
def follow_user_follows(client, target_user):
"Follow everyone the target_user is following."
cursor = None
total_followed = 0
while True:
# Step 1: Fetch a batch of accounts the target user is following
# https://docs.bsky.app/docs/api/app-bsky-graph-get-follows
response = client.app.bsky.graph.get_follows({
@hamelsmu
hamelsmu / modern_web_applications_in_pure_python.md
Created November 2, 2024 18:57
Modern web applications in pure Python

Read docs

Modern web applications in pure Python

Built on solid web foundations, not the latest fads - with FastHTML you can get started on anything from simple dashboards to scalable web applications in minutes.

Learn more Watch intro 7min 30sec

Try now

@hamelsmu
hamelsmu / on_this_page.md
Created November 2, 2024 18:55
On this page

Practical Deep Learning for Coders

  • __

__

  1. Practical Deep Learning
  • Practical Deep Learning
@hamelsmu
hamelsmu / the_first_certificate_in_deep_learning.md
Created November 2, 2024 18:52
The First Certificate in Deep Learning

fast.ai

  • About
  • __
  • __
  • __

The First Certificate in Deep Learning

courses

@hamelsmu
hamelsmu / your_ai_product_needs_evals.md
Created October 11, 2024 17:23
Your AI Product Needs Evals

Your AI Product Needs Evals

LLMs

How to construct domain-specific LLM evaluation systems.

Author

Hamel Husain

@hamelsmu
hamelsmu / Async_parallel.ipynb
Last active October 9, 2024 04:12
dataroom/nbs/db_queue.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hamelsmu
hamelsmu / structured_outputs.md
Created October 7, 2024 18:30
Structured Outputs

Structured Outputs

Introduction

JSON is one of the most widely used formats in the world for applications to exchange data.

Structured Outputs is a feature that ensures the model will always generate responses that adhere to your supplied JSON Schema, so you don't need to worry about the model omitting a required key, or hallucinating an invalid enum value.

Some benefits of Structed Outputs include: