Views
No views yet
pip install pruna_pro1from pruna_pro import PrunaProModel
2
3loaded_model = PrunaProModel.from_pretrained(
4 "loulou2/tiny_llama_hqq"
5)
6# we can then run inference using the methods supported by the base modelsmash_config.json file, which describes the optimization methods that were applied to the model.1{
2 "batcher": null,
3 "cacher": null,
4 "compiler": null,
5 "distiller": null,
6 "distributer": null,
7 "enhancer": null,
8 "factorizer": null,
9 "kernel": null,
10 "pruner": null,
11 "quantizer": "hqq",
12 "recoverer": null,
13 "hqq_backend": "torchao_int4",
14 "hqq_compute_dtype": "torch.bfloat16",
15 "hqq_force_hf_implementation": true,
16 "hqq_group_size": 64,
17 "hqq_use_torchao_kernels": false,
18 "hqq_weight_bits": 4,
19 "batch_size": 1,
20 "device": "cuda",
21 "device_map": null,
22 "save_fns": [],
23 "load_fns": [
24 "transformers"
25 ],
26 "reapply_after_load": {
27 "factorizer": null,
28 "pruner": null,
29 "quantizer": null,
30 "distiller": null,
31 "kernel": null,
32 "cacher": null,
33 "recoverer": null,
34 "distributer": null,
35 "compiler": null,
36 "batcher": null,
37 "enhancer": null
38 }
39}