Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| medicine-LLM.Q2_K.gguf | Q2_K | 2.36GB |
| medicine-LLM.IQ3_XS.gguf | IQ3_XS | 2.6GB |
| medicine-LLM.IQ3_S.gguf | IQ3_S | 2.75GB |
| medicine-LLM.Q3_K_S.gguf | Q3_K_S | 2.75GB |
| medicine-LLM.IQ3_M.gguf | IQ3_M | 2.9GB |
| medicine-LLM.Q3_K.gguf | Q3_K | 3.07GB |
| medicine-LLM.Q3_K_M.gguf | Q3_K_M | 3.07GB |
| medicine-LLM.Q3_K_L.gguf | Q3_K_L | 3.35GB |
| medicine-LLM.IQ4_XS.gguf | IQ4_XS | 3.4GB |
| medicine-LLM.Q4_0.gguf | Q4_0 | 3.56GB |
| medicine-LLM.IQ4_NL.gguf | IQ4_NL | 3.58GB |
| medicine-LLM.Q4_K_S.gguf | Q4_K_S | 3.59GB |
| medicine-LLM.Q4_K.gguf | Q4_K | 3.8GB |
| medicine-LLM.Q4_K_M.gguf | Q4_K_M | 3.8GB |
| medicine-LLM.Q4_1.gguf | Q4_1 | 3.95GB |
| medicine-LLM.Q5_0.gguf | Q5_0 | 4.33GB |
| medicine-LLM.Q5_K_S.gguf | Q5_K_S | 4.33GB |
| medicine-LLM.Q5_K.gguf | Q5_K | 4.45GB |
| medicine-LLM.Q5_K_M.gguf | Q5_K_M | 4.45GB |
| medicine-LLM.Q5_1.gguf | Q5_1 | 4.72GB |
| medicine-LLM.Q6_K.gguf | Q6_K | 5.15GB |
| medicine-LLM.Q8_0.gguf | Q8_0 | 6.67GB |

1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("AdaptLLM/medicine-LLM")
4tokenizer = AutoTokenizer.from_pretrained("AdaptLLM/medicine-LLM", use_fast=False)
5
6# Put your input here:
7user_input = '''Question: Which of the following is an example of monosomy?
8Options:
9- 46,XX
10- 47,XXX
11- 69,XYY
12- 45,X
13
14Please provide your choice first and then provide explanations if possible.'''
15
16# Simply use your input as the prompt for base models
17prompt = user_input
18
19inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).input_ids.to(model.device)
20outputs = model.generate(input_ids=inputs, max_length=2048)[0]
21
22answer_start = int(inputs.shape[-1])
23pred = tokenizer.decode(outputs[answer_start:], skip_special_tokens=True)
24
25print(f'### User Input:\n{user_input}\n\n### Assistant Output:\n{pred}')1@inproceedings{
2cheng2024adapting,
3title={Adapting Large Language Models via Reading Comprehension},
4author={Daixuan Cheng and Shaohan Huang and Furu Wei},
5booktitle={The Twelfth International Conference on Learning Representations},
6year={2024},
7url={https://openreview.net/forum?id=y886UXPEZ0}
8}