Camelidae and Qwen2idae models are trained utilizing Parameter-Efficient Sparsity Crafting techniques
We present Parameter-Efficient Sparsity Crafting to help dense models learn knowledge from different fields (including code and math). This approach performs instruction tuning and efficiently utilizes MoE structure.
Specifically, Parameter-Efficient Sparsity Crafting utilizes parameter-efficient techniques including
QLoRA and
Adapter to perform Efficient
Sparse Upcycling.
We bold the top3 scores separately for all models.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained("hywu/Camelidae-8x13B", trust_remote_code=True)
4model = AutoModelForCausalLM.from_pretrained("hywu/Camelidae-8x13B", device_map="auto", trust_remote_code=True).eval()
5
6inputs = tokenizer('### Human:\nHow are you?\n### Assistant:\n', return_tensors='pt')
7inputs = inputs.to(model.device)
8pred = model.generate(**inputs)
9print(tokenizer.decode(pred.cpu()[0], skip_special_tokens=True))
1@article{wu2024parameter,
2 title={Parameter-Efficient Sparsity Crafting from Dense to Mixture-of-Experts for Instruction Tuning on General Tasks},
3 author={Wu, Haoyuan and Zheng, Haisheng and Yu, Bei},
4 journal={arXiv preprint arXiv:2401.02731},
5 year={2024}
6}
The source code in this repo is licensed under the
Apache 2.0 License. Camelidae models are developed for academic research and free commercial use, all usage must adhere to the license from
facebookresearch and
01-ai.