Skip to content

Commit 5f1e739

Browse files
jxnlclaude
andcommitted
docs: reorder week2 notebooks to focus on open-source fine-tuning
With Cohere fine-tuning deprecated, restructure Week 2 to emphasize the open-source sentence-transformers approach: - Move Open Source Models notebook to position 2 (recommended) - Move deprecated Cohere notebook to position 3 (reference only) - Update overview to highlight open-source focus - Revise learning objectives to remove managed service references - Update prerequisites to remove Cohere API requirement - Adjust expected outcomes and next steps accordingly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2a3eae9 commit 5f1e739

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

latest/week2/README.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44

55
This week focuses on one of the most impactful ways to improve RAG system performance: fine-tuning embedding models for your specific domain. Generic embedding models are trained on broad internet data and may not capture the nuances of your particular use case. By fine-tuning these models with domain-specific data, you can achieve significant improvements in retrieval quality.
66

7-
You'll explore two complementary approaches to fine-tuning: using managed services like Cohere that handle the infrastructure complexity for you, and open-source solutions using sentence-transformers that give you complete control over the process. Both approaches demonstrate 15-30% improvements in key retrieval metrics, making fine-tuning one of the highest-ROI optimizations for RAG systems.
7+
**Note**: As of September 2025, Cohere no longer supports fine-tuning. This week now focuses primarily on open-source fine-tuning using sentence-transformers, which gives you complete control over the training process and demonstrates 15-30% improvements in key retrieval metrics, making fine-tuning one of the highest-ROI optimizations for RAG systems.
88

99
## Learning Objectives
1010

1111
By the end of this week, you'll be able to:
1212

1313
- Generate high-quality synthetic training data for embedding fine-tuning
1414
- Implement manual review processes to ensure training data quality
15-
- Fine-tune embedding models using both managed services and open-source tools
15+
- Fine-tune embedding models using open-source tools like sentence-transformers
1616
- Create effective training datasets with hard and semi-hard negatives
1717
- Evaluate fine-tuned models against baselines using established metrics
18-
- Deploy fine-tuned models to production environments
19-
- Make informed decisions between managed and self-hosted approaches
18+
- Deploy fine-tuned models to Hugging Face Hub for production use
19+
- Understand triplet loss and semi-hard negative mining techniques
2020

2121
## Notebooks
2222

@@ -37,41 +37,41 @@ By the end of this week, you'll be able to:
3737
- Manual review interface using Streamlit
3838
- Evaluation pipeline with LanceDB for measuring improvements
3939

40-
### 2. Finetune Cohere.ipynb (Deprecated)
40+
### 2. Open Source Models.ipynb (Recommended)
4141

42-
> **Note**: As of September 2025, Cohere no longer supports fine-tuning. This notebook is kept for reference purposes.
43-
44-
**Purpose**: Fine-tune a Cohere re-ranker model using managed services for simplified deployment
42+
**Purpose**: Fine-tune open-source embedding models with complete control over the training process
4543

4644
**What You'll Learn**:
4745

48-
- Hard negative mining techniques for effective training
49-
- Working with Cohere's fine-tuning API
50-
- Comparative evaluation of base vs. fine-tuned models
51-
- Performance analysis and visualization techniques
46+
- Triplet loss training with semi-hard negative mining
47+
- SentenceTransformerTrainer configuration and usage
48+
- Model deployment to Hugging Face Hub
49+
- Hyperparameter tuning and evaluation techniques
5250

5351
**What You'll Build**:
5452

55-
- Fine-tuned Cohere re-ranker model
56-
- Training dataset with carefully selected hard negatives
57-
- Performance comparison visualizations
53+
- Fine-tuned BAAI/bge-base-en embedding model
54+
- Training pipeline using sentence-transformers
55+
- Deployable model on Hugging Face Hub
5856

59-
### 3. Open Source Models.ipynb
57+
### 3. Finetune Cohere.ipynb (Deprecated - Reference Only)
6058

61-
**Purpose**: Fine-tune open-source embedding models with complete control over the training process
59+
> **Note**: As of September 2025, Cohere no longer supports fine-tuning. Please focus on the Open Source Models notebook instead. This notebook is kept for reference purposes only.
60+
61+
**Purpose**: Fine-tune a Cohere re-ranker model using managed services for simplified deployment
6262

6363
**What You'll Learn**:
6464

65-
- Triplet loss training with semi-hard negative mining
66-
- SentenceTransformerTrainer configuration and usage
67-
- Model deployment to Hugging Face Hub
68-
- Trade-offs between managed services and self-hosted solutions
65+
- Hard negative mining techniques for effective training
66+
- Working with Cohere's fine-tuning API (deprecated)
67+
- Comparative evaluation of base vs. fine-tuned models
68+
- Performance analysis and visualization techniques
6969

7070
**What You'll Build**:
7171

72-
- Fine-tuned BAAI/bge-base-en embedding model
73-
- Training pipeline using sentence-transformers
74-
- Deployable model on Hugging Face Hub
72+
- Fine-tuned Cohere re-ranker model (no longer supported)
73+
- Training dataset with carefully selected hard negatives
74+
- Performance comparison visualizations
7575

7676
## Key Concepts
7777

@@ -91,9 +91,9 @@ By the end of this week, you'll be able to:
9191

9292
### Technical Requirements
9393

94-
- Python packages: `sentence-transformers`, `lancedb`, `braintrust`, `pydantic`, `openai`, `cohere`, `streamlit`
95-
- API keys: OpenAI API access, Cohere API key, Hugging Face token with write access
96-
- Hardware: GPU recommended for open-source fine-tuning (CPU possible but slower)
94+
- Python packages: `sentence-transformers`, `lancedb`, `braintrust`, `pydantic`, `openai`, `streamlit`
95+
- API keys: OpenAI API access, Hugging Face token with write access
96+
- Hardware: GPU recommended for fine-tuning (CPU possible but slower)
9797

9898
## Project Structure
9999

@@ -126,9 +126,9 @@ After completing this week's materials, you'll have:
126126

127127
1. A high-quality domain-specific training dataset with validated examples
128128
2. Fine-tuned embedding models showing 15-30% improvement in retrieval metrics
129-
3. Experience with both managed (Cohere) and open-source (sentence-transformers) approaches
130-
4. Deployed models ready for production use
131-
5. Clear understanding of when to use managed services vs. self-hosted solutions
129+
3. Hands-on experience with open-source fine-tuning using sentence-transformers
130+
4. Deployed models on Hugging Face Hub ready for production use
131+
5. Understanding of triplet loss, semi-hard negatives, and hyperparameter tuning
132132

133133
## Common Issues and Solutions
134134

@@ -147,9 +147,9 @@ After completing this week's materials, you'll have:
147147
## Next Steps
148148

149149
- Complete notebooks in order to build upon concepts progressively
150-
- Compare performance gains between Cohere and open-source approaches
150+
- Experiment with different base models and hyperparameter configurations
151151
- Review Week 3 content to prepare for advanced retrieval techniques
152-
- Experiment with different negative sampling strategies
152+
- Explore different negative sampling strategies (hard vs. semi-hard negatives)
153153

154154
## Additional Resources
155155

0 commit comments

Comments
 (0)