Views
No views yet
| Model | MultiMedQA | MMLU | GPQA | Alpaca Eval 2 (LC/WR) |
|---|---|---|---|---|
| Llama-3.1-8B-Instruct | 71.38 | 73.00 | 30.40 | 20.90/21.80 |
| Llama-3.1-8B-UltraMedical | 76.82 | 72.96 | 34.82 | 41.22/48.20 |
1from transformers import AutoTokenizer
2from vllm import LLM, SamplingParams
3
4llm = LLM(model="TsinghuaC3I/Llama-3.1-8B-UltraMedical", trust_remote_code=True)
5tokenizer = AutoTokenizer.from_pretrained("TsinghuaC3I/Llama-3.1-8B-UltraMedical")
6sampling_params = SamplingParams(temperature=0.7, top_p=0.9, max_tokens=1024, stop=["<|eot_id|>"])
7
8messages = [
9 {"role": "user", "content": """The question format used in the above input examples。"""},
10]
11prompts = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
12print(prompts[0])
13"""
14<|begin_of_text|><|start_header_id|>user<|end_header_id|>
15
16{question}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
17
18"""
19
20outputs = llm.generate(prompts=prompts, sampling_params=sampling_params)
21print(outputs[0].outputs[0].text)@misc{zhang2024ultramedical,
title={UltraMedical: Building Specialized Generalists in Biomedicine},
author={Kaiyan Zhang and Sihang Zeng and Ermo Hua and Ning Ding and Zhang-Ren Chen and Zhiyuan Ma and Haoxin Li and Ganqu Cui and Biqing Qi and Xuekai Zhu and Xingtai Lv and Hu Jinfang and Zhiyuan Liu and Bowen Zhou},
year={2024},
eprint={2406.03949},
archivePrefix={arXiv},
primaryClass={cs.CL}
}