--- license: apache-2.0 library_name: transformers datasets: - jondurbin/truthy-dpo-v0.1 model-index: - name: WestLake-7B-v2-laser-truthy-dpo results: - task: type: text-generation name: Text Generation dataset: name: AI2 Reasoning Challenge (25-Shot) type: ai2_arc config: ARC-Challenge split: test args: num_few_shot: 25 metrics: - type: acc_norm value: 73.89 name: normalized accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=macadeliccc/WestLake-7B-v2-laser-truthy-dpo name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: HellaSwag (10-Shot) type: hellaswag split: validation args: num_few_shot: 10 metrics: - type: acc_norm value: 88.85 name: normalized accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=macadeliccc/WestLake-7B-v2-laser-truthy-dpo name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: MMLU (5-Shot) type: cais/mmlu config: all split: test args: num_few_shot: 5 metrics: - type: acc value: 64.84 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=macadeliccc/WestLake-7B-v2-laser-truthy-dpo name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: TruthfulQA (0-shot) type: truthful_qa config: multiple_choice split: validation args: num_few_shot: 0 metrics: - type: mc2 value: 69.81 source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=macadeliccc/WestLake-7B-v2-laser-truthy-dpo name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: Winogrande (5-shot) type: winogrande config: winogrande_xl split: validation args: num_few_shot: 5 metrics: - type: acc value: 86.66 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=macadeliccc/WestLake-7B-v2-laser-truthy-dpo name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: GSM8k (5-shot) type: gsm8k config: main split: test args: num_few_shot: 5 metrics: - type: acc value: 68.16 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=macadeliccc/WestLake-7B-v2-laser-truthy-dpo name: Open LLM Leaderboard --- # WestLake-7B-v2-laser-truthy-dpo ![westlake-header](westlake-header.png) ## Process + Trained [cognitivecomputations/WestLake-7B-v2-laser](https://huggingface.co/cognitivecomputations/WestLake-7B-v2-laser) on jondurbin/truthy-dpo-v0.1 + Completed 2 epochs + 2e-5 learning rate ## Evaluations ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6455cc8d679315e4ef16fbec/9CJeaPxf4XGJv7w114LKo.png) Evaluated the GGUF for usability reasons. EQ-Bench uses Ooba for inference.
----Benchmark Complete---- 2024-01-31 14:38:14 Time taken: 18.9 mins Prompt Format: ChatML Model: macadeliccc/WestLake-7B-v2-laser-truthy-dpo-GGUF Score (v2): 75.15 Parseable: 171.0 --------------- Batch completed Time taken: 19.0 mins ---------------## GGUF GGUF versions are available [here](https://huggingface.co/macadeliccc/WestLake-7B-v2-laser-truthy-dpo-GGUF) # ExLlamav2 Thanks to user [bartowski](https://huggingface.co/bartowski) we now have exllamav2 quantizations in 3.5 through 8 bpw. They are available here: + [bartowski/WestLake-7B-v2-laser-truthy-dpo-exl2](https://huggingface.co/bartowski/WestLake-7B-v2-laser-truthy-dpo-exl2) ## Chat Template This was my process during fine tune to realign the prompt template to chatML. There seems to be an error where you can use either Mistral (original) prompt template or you can use ChatML in the GGUF version. ```python def chatml_format(example): # Format system if len(example['system']) > 0: message = {"role": "system", "content": example['system']} system = tokenizer.apply_chat_template([message], tokenize=False) else: system = "" # Format instruction message = {"role": "user", "content": example['prompt']} prompt = tokenizer.apply_chat_template([message], tokenize=False, add_generation_prompt=True) # Format chosen answer chosen = example['chosen'] + "<|im_end|>\n" # Format rejected answer rejected = example['rejected'] + "<|im_end|>\n" return { "prompt": system + prompt, "chosen": chosen, "rejected": rejected, } ``` ## Transformers ChatML does not work properly in transformers for this model. This demo code for the transformers library works properly: ```python from transformers import AutoTokenizer import transformers import torch model = "macadeliccc/WestLake-7B-v2-laser-truthy-dpo" chat = [ {"role": "user", "content": "Hello, how are you?"}, {"role": "assistant", "content": "I'm doing great. How can I help you today?"}, {"role": "user", "content": "I'd like to show off how chat templating works!"}, ] tokenizer = AutoTokenizer.from_pretrained(model) prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True) pipeline = transformers.pipeline( "text-generation", model=model, torch_dtype=torch.float16, device_map="auto", ) outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95) print(outputs[0]["generated_text"]) ``` This code produces this output in multi-turn conversation: ```