Views
No views yet

trust_remote_code=True.hella swag: 0.8661
winogrande: 0.824
truthfulqa_mc2: 0.4855
arc_challenge: 0.6638
gsm8k: 0.5709
MMLU: 0.71731import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model = AutoModelForCausalLM.from_pretrained("DiscoResearch/mixtral-7b-8expert", low_cpu_mem_usage=True, device_map="auto", trust_remote_code=True)
5tok = AutoTokenizer.from_pretrained("DiscoResearch/mixtral-7b-8expert")
6x = tok.encode("The mistral wind in is a phenomenon ", return_tensors="pt").cuda()
7x = model.generate(x, max_new_tokens=128).cpu()
8print(tok.batch_decode(x))convert_mistral_moe_weights_to_hf.py --input_dir ./input_dir --model_size 7B --output_dir ./output to convert the original consolidated weights to this HF setup.