Instructions to use ayanami-kitasan/code-pruner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ayanami-kitasan/code-pruner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="ayanami-kitasan/code-pruner")# pip install -U transformers accelerate # Load model directly from transformers import SwePrunerForCodeCompression model = SwePrunerForCodeCompression.from_pretrained("ayanami-kitasan/code-pruner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from ayanami-kitasan/code-pruner: direct link, hf CLI and curl.
- Browser
- Download file 463 Bytes
-
https://huggingface.co/ayanami-kitasan/code-pruner/resolve/main/config.json
- Command line
-
hf download hf://ayanami-kitasan/code-pruner/config.json
-
curl -L -o config.json https://huggingface.co/ayanami-kitasan/code-pruner/resolve/main/config.json
463 Bytes
| { | |
| "architectures": [ | |
| "SwePrunerForCodeCompression" | |
| ], | |
| "backbone_model_name_or_path": "Qwen/Qwen3-Reranker-0.6B", | |
| "bottleneck": 256, | |
| "compression_head_type": "crf", | |
| "compression_loss_type": "focal", | |
| "dropout": 0.4, | |
| "early_layer_ratio": 0.25, | |
| "middle_layer_ratio": 0.5, | |
| "model_type": "swepruner", | |
| "num_fusion_layers": 1, | |
| "num_heads": 8, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.55.0", | |
| "use_multi_layer_fusion": true | |
| } | |