--- language: - en license: llama3 library_name: transformers tags: - biology - medical datasets: - thesven/SyntheticMedicalQA-4336 --- # Model Card for Model ID ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6324ce4d5d0cf5c62c6e3c5a/ZMeYpx2-wRbla__Tf6fvr.png) ## Model Details ### Model Description Llama3-8B-SFT-SSyntheticMedical-bnb-4bit is trained using the SFT method via QLoRA on 4336 rows of medical data to enhance it's abilities in the realm of scientific anatomy. This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated. ### Using the model with transformers ```python from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig model_name_or_path = "thesven/Llama3-8B-SFT-SyntheticMedical-bnb-4bit" # BitsAndBytesConfig for loading the model in 4-bit precision bnb_config = BitsAndBytesConfig( load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype="float16", ) tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True) model = AutoModelForCausalLM.from_pretrained( model_name_or_path, device_map="auto", trust_remote_code=False, revision="main", quantization_config=bnb_config ) model.pad_token = model.config.eos_token_id prompt_template = ''' <> You are a very creative story writer. Write a story on the following topic: <> [INST] Describe the function of the hamstring [/INST] [ASSISTANT] ''' input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda() output = model.generate(inputs=input_ids, temperature=0.1, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512) print(generated_text) ``` - **Finetuned by:** thesven