randomani/MedicalQnA-llama2
Viewer • Updated • 16.4k • 15 • 1
How to use randomani/Llama-2-7b-chat-Medchat-finetune with Adapters:
from adapters import AutoAdapterModel
model = AutoAdapterModel.from_pretrained("fill-in-model-name")
model.load_adapter("randomani/Llama-2-7b-chat-Medchat-finetune", set_active=True)This repository contains the code and configuration for fine-tuning the LLaMA-2 chat model using the Medical QnA dataset with the QLoRA technique.Used only 2k data elements for training due to constrained gpu resources.
NousResearch/Llama-2-7b-chat-hfrandomani/MedicalQnA-llama2Llama-2-7b-Medchat-finetunelora_r): 64lora_alpha): 16lora_dropout): 0.1use_4bit): Truebnb_4bit_compute_dtype): float16bnb_4bit_quant_type): nf4use_nested_quant): Falsenum_train_epochs): 1fp16): Falsebf16): Falseper_device_train_batch_size): 4per_device_eval_batch_size): 4gradient_accumulation_steps): 1gradient_checkpointing): Truemax_grad_norm): 0.3learning_rate): 2e-4weight_decay): 0.001optim): paged_adamw_32bitlr_scheduler_type): cosinemax_steps): -1warmup_ratio): 0.03group_by_length): Truesave_steps): 0logging_steps): 25max_seq_length): Nonepacking): FalseFor more details and access to the dataset, visit the Hugging Face Dataset Page.