feat: config-driven distillation pipeline for per-school fine-tuned models#93
Open
William-Hill wants to merge 18 commits intomainfrom
Open
feat: config-driven distillation pipeline for per-school fine-tuned models#93William-Hill wants to merge 18 commits intomainfrom
William-Hill wants to merge 18 commits intomainfrom
Conversation
Per-school fine-tuning pipeline to replace OpenAI dependency for explanation and summarization endpoints with locally-served Qwen 3.5 models via MLX and Ollama.
…ed utilities - Unify generate_explainer/summarizer_pairs into single generate_pairs() - Extract read_jsonl() and get_message_content() to config.py - Replace 3 duplicate _extract_*_content helpers with get_message_content - Lazy-init OpenAI client in model-client.ts (skip when using Ollama) - Extract shared generate() helper in model-client.ts - Move import re to module level in eval.py - Remove redundant config mutation in finetune.py - Batch flush every 25 records instead of every record - Remove unnecessary what-comments
Collaborator
Author
|
@coderabbitai review |
- Pass maxTokens through to Ollama backend (was hardcoded to 1024) - Remove unused variables: seed_queries in distill.py, config in eval.py and export.py - Fix num_layers using lora_rank instead of dedicated config key in finetune.py - Remove duplicate pyyaml entry in requirements.txt - Clean up unused imports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
distill → prepare → finetune → eval → export) that generates per-school fine-tuned Qwen 3.5 models for course explanations and query summaries/api/courses/explain-pairingand/api/query-summarywith a model-client adapter that routes to local Ollama (fine-tuned) or OpenAI (fallback)config.yaml+seed_queries.yaml, run 5 commandsNew files
training/schools/bishop-state/tests/training/codebenders-dashboard/lib/model-client.tsTest plan
pytest tests/training/ -v)npm run build)--helppython -m training.distill --school bishop-state --localwith Ollama🤖 Generated with Claude Code