distily
1.0.0
pip install -U "git+https://github.com/lapp0/distily.git"
寬鬆地允許您蒸餾出模型
最小示例: distily_gpt2
命令創建只有6層的蒸餾gpt2 :
python3 -m distily.run
--teacher_model_name_or_path gpt2
--output_dir distily_gpt2
--hub_model_id "distily/distily_gpt2"
--push_to_hub True
--student_model_config {"n_layers": 6}
--student_model_as_bitnet True
所得的distily_gpt2模型具有(todo:解釋指標)。
有關更多示例,請查看示例文檔。
要推入集線器,您必須準備輪轂令牌
HF_WRITE=<your hub token> python3 -c "from huggingface_hub.hf_api import HfFolder; HfFolder.save_token('${HF_WRITE}')"
TODO:完成鏈接的文檔後完成
使用疏遠
可用型號
貢獻
num_hidden_layers模型。 intermediate_size , hidden_act )的模型中。 num_attention_heads和num_key_value_heads的模型。