1+ {
2+ "_parent_entries" : [ [ " ^" , " byname" , " python_script" ], [ " ^" , " byname" , " entry_creator" ] ],
3+ "_producer_rules" : [
4+ [ [ " quantized" , " method=llm_compressor" ], [[ " get" , " pipeline" ]] ]
5+ ],
6+
7+ "pipeline" : [ " ^^" , " execute" , [[
8+ [ " run" ],
9+ [ ],
10+ [ " get" , " stored_newborn_entry" ]
11+ ]] ],
12+
13+ "desired_python_version" : " 3.11" ,
14+
15+ "model_name" : " llama3_1" ,
16+ "model_variant" : " 8b" ,
17+ "conversion_method" : " transformers" ,
18+
19+ "source_model_query" : [ " ^^" , " substitute" , [[
20+ " converted" ,
21+ [ " method" , " #{conversion_method}#" ],
22+ [ " model_name" , " #{model_name}#" ],
23+ [ " model_variant" , " #{model_variant}#" ]
24+ ]] ],
25+ "source_model_entry" : [ " ^" , " byquery" ,
26+ [[ " ^^" , " get" , " source_model_query" ]], {}, [ " source_model_query" ]
27+ ],
28+ "source_model_path" : [ " ^^" , " execute" , [[
29+ [ " get" , " source_model_entry" ],
30+ [ " get_path" ]
31+ ]] ],
32+
33+ "target_model_path" : [ " ^^" , " get" , " newborn_entry_path" ],
34+
35+ "dataset_name" : " cnndm" ,
36+ "calib_dataset_query" : [ " ^^" , " substitute" , [[
37+ " downloaded" ,
38+ [ " dataset_name" , " #{dataset_name}#" ],
39+ [ " model_family" , " #{model_name}#" ],
40+ [ " variant" , " #{model_variant}#" ],
41+ [ " type" , " calibration" ]
42+ ]] ],
43+ "calib_dataset_entry" : [ " ^" , " byquery" ,
44+ [[ " ^^" , " get" , " calib_dataset_query" ]], {}, [ " calib_dataset_query" ]
45+ ],
46+ "calib_dataset_path" : [ " ^^" , " execute" , [[
47+ [ " get" , " calib_dataset_entry" ],
48+ [ " get_path" ],
49+ [ " __add__" , " /cnn_dailymail_calibration.json" ]
50+ ]] ],
51+
52+ "num_gpus" : 1 ,
53+ "max_sequence_length" : 4096 ,
54+ "num_calibration_samples" : 1000 ,
55+
56+ "python_deps" : [
57+ [ " ^^" , " python_sync_pip_package" , [[
58+ " python_package" ,
59+ " package_name=llm-compressor" ,
60+ " installable=git+https://github.com/vllm-project/llm-compressor.git@sa/big_model_support" ,
61+ [" desired_python_version" , [ " ^^" , " get" , " desired_python_version" ] ]
62+ ]] ],
63+ [ " ^^" , " python_sync_pip_package" , [[
64+ " python_package" ,
65+ " package_name=compressed-tensors" ,
66+ " package_version=0.5.0" ,
67+ [" desired_python_version" , [ " ^^" , " get" , " desired_python_version" ] ]
68+ ]] ]
69+ ],
70+
71+ "newborn_entry_tags" : [ " quantized" , " method=llm_compressor" ],
72+ "newborn_name_template" : [ " quantized_#{model_name}#_#{model_variant}#_using_#{method}#" ],
73+ "newborn_entry_param_names" : [
74+ " model_name" ,
75+ " model_variant"
76+ ],
77+
78+ "rel_script_path" : " quantize.py" ,
79+
80+ "script_extra_params" : [ " ^^" , " substitute" ,
81+ " #{source_model_path}# #{target_model_path}# #{calib_dataset_path}# #{num_gpus}# #{max_sequence_length}# #{num_calibration_samples}#"
82+ ]
83+ }
0 commit comments