quickdistill 0.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ """
2
+ QuickDistill - A fast and easy toolkit for distilling AI models.
3
+
4
+ This package provides tools to:
5
+ - Capture and view Weave traces
6
+ - Run weak models on strong model outputs
7
+ - Evaluate similarity using LLM judges
8
+ - Export datasets for model evaluation
9
+ """
10
+
11
+ __version__ = "0.1.4"
12
+ __author__ = "Brett Young"
13
+ __email__ = "bdytx5@umsystem.edu"
14
+
15
+ from quickdistill.cli import main
16
+
17
+ __all__ = ["main"]
quickdistill/cli.py ADDED
@@ -0,0 +1,70 @@
1
+ """
2
+ CLI interface for QuickDistill
3
+ """
4
+ import argparse
5
+ import webbrowser
6
+ import time
7
+ import os
8
+ from pathlib import Path
9
+ from quickdistill.server import app
10
+
11
+
12
+ def launch_command(args):
13
+ """Launch the QuickDistill UI"""
14
+ port = args.port
15
+ data_dir = Path.home() / '.cache' / 'quickdistill'
16
+
17
+ print(f"šŸš€ Launching QuickDistill UI...")
18
+ print(f"šŸ’¾ Data directory: {data_dir}")
19
+ print(f"🌐 Server running on http://localhost:{port}")
20
+ print(f"\nšŸ’” Access the UI at:")
21
+ print(f" - Trace Viewer: http://localhost:{port}/")
22
+ print(f" - Judge Manager: http://localhost:{port}/judge")
23
+ print(f"\nā¹ Press Ctrl+C to stop the server\n")
24
+
25
+ # Open browser after a short delay
26
+ if not args.no_browser:
27
+ def open_browser():
28
+ time.sleep(1.5)
29
+ webbrowser.open(f"http://localhost:{port}/")
30
+
31
+ import threading
32
+ threading.Thread(target=open_browser, daemon=True).start()
33
+
34
+ # Run the Flask app
35
+ app.run(host='0.0.0.0', port=port, debug=args.debug)
36
+
37
+
38
+ def main():
39
+ """Main CLI entry point"""
40
+ parser = argparse.ArgumentParser(
41
+ description="QuickDistill - Fast and easy AI model distillation toolkit",
42
+ formatter_class=argparse.RawDescriptionHelpFormatter,
43
+ epilog="""
44
+ Examples:
45
+ quickdistill launch Launch the UI on default port 5001
46
+ quickdistill launch --port 8080 Launch on custom port
47
+ quickdistill launch --no-browser Launch without opening browser
48
+ """
49
+ )
50
+
51
+ subparsers = parser.add_subparsers(dest='command', help='Available commands')
52
+
53
+ # Launch command
54
+ launch_parser = subparsers.add_parser('launch', help='Launch the QuickDistill UI')
55
+ launch_parser.add_argument('--port', type=int, default=5001, help='Port to run the server on (default: 5001)')
56
+ launch_parser.add_argument('--no-browser', action='store_true', help='Do not open browser automatically')
57
+ launch_parser.add_argument('--debug', action='store_true', help='Run in debug mode')
58
+ launch_parser.set_defaults(func=launch_command)
59
+
60
+ args = parser.parse_args()
61
+
62
+ if not args.command:
63
+ parser.print_help()
64
+ return
65
+
66
+ args.func(args)
67
+
68
+
69
+ if __name__ == '__main__':
70
+ main()
@@ -0,0 +1,16 @@
1
+ [
2
+ {
3
+ "name": "boolean_scorer",
4
+ "type": "llm",
5
+ "model": "gpt-5",
6
+ "returnType": "boolean",
7
+ "prompt": "You are a strict evaluator comparing two AI responses (one from a strong reference model which is the ground truth, and one from a weaker model which we are testing to see how similar the responses it generates are to the strong model).\n\nStrong Model Response: {strong_output}\nWeak Model Response: {weak_output}\n\nDetermine if the weak model response is CORRECT compared to the strong model response.\nConsider a response CORRECT if it conveys the same key information and meaning, even if worded differently.\n\nRespond in JSON format: {'correct': true} or {'correct': false}"
8
+ },
9
+ {
10
+ "name": "scalar_scorer",
11
+ "type": "llm",
12
+ "model": "gpt-5",
13
+ "returnType": "scalar",
14
+ "prompt": "You are a strict evaluator comparing two AI responses (one from a strong reference model which is the ground truth, and one from a weaker model which we are testing to see how similar the responses it generates are to the strong model).\n\nStrong Model Response: {strong_output}\nWeak Model Response: {weak_output}\n\nEvaluate how similar the weak model response is to the strong model response.\nRate on a scale of 1-5 where 1=completely different and 5=nearly identical. RETURN ONLY ONE SCORE REPRESENTY THE AVERAGE SIMILARITY (EG 5-(avg_error))\n\nRespond in JSON format eg {'scores': the_score }"
15
+ }
16
+ ]