Views
No views yet
pip install pruna1from pruna import PrunaModel
2
3loaded_model = PrunaModel.from_pretrained(
4 "AINovice2005/SmolLM-360M-smashed"
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": "torch_compile",
5 "factorizer": null,
6 "kernel": null,
7 "pruner": null,
8 "quantizer": "hqq",
9 "hqq_backend": "torchao_int4",
10 "hqq_compute_dtype": "torch.bfloat16",
11 "hqq_force_hf_implementation": false,
12 "hqq_group_size": 128,
13 "hqq_use_torchao_kernels": true,
14 "hqq_weight_bits": 4,
15 "torch_compile_backend": "inductor",
16 "torch_compile_dynamic": false,
17 "torch_compile_fullgraph": true,
18 "torch_compile_make_portable": false,
19 "torch_compile_max_kv_cache_size": 800,
20 "torch_compile_mode": "default",
21 "torch_compile_seqlen_manual_cuda_graph": 400,
22 "torch_compile_target": "module_list",
23 "batch_size": 1,
24 "device": "cuda:0",
25 "device_map": null,
26 "save_fns": [
27 "hqq",
28 "save_before_apply"
29 ],
30 "load_fns": [
31 "hqq"
32 ],
33 "reapply_after_load": {
34 "factorizer": null,
35 "pruner": null,
36 "quantizer": null,
37 "kernel": null,
38 "cacher": null,
39 "compiler": "torch_compile",
40 "batcher": null
41 }
42}