distily
1.0.0
pip install -U "git+https://github.com/lapp0/distily.git"
ช่วยให้คุณกลั่นแบบจำลองด้วย
ตัวอย่างน้อยที่สุด: distily_gpt2
คำสั่งเพื่อสร้าง gpt2 กลั่นด้วยเพียง 6 เลเยอร์:
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 ที่ได้มี (สิ่งที่ต้องทำ: อธิบายตัวชี้วัด)
สำหรับตัวอย่างเพิ่มเติมตรวจสอบเอกสารตัวอย่าง
เพื่อผลักดันไปยังฮับคุณต้องเตรียมโทเค็นฮับของคุณ
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