metadata
base_model: unsloth/Phi-3-mini-4k-instruct-bnb-4bit
language:
- en
license: creativeml-openrail-m
tags:
- text-generation-inference
- transformers
- unsloth
- trl
- sft
Note
- This is an Experiment to generate Clinical Trial Synopsis. Will be making a better one Soon! Stay Updated
- Model ArvindSharma18/Phi-3-mini-4k-instruct-bnb-4bit-Clinical-Trail-Merged-Exp
How to Use
Note: May Hallucinate(The purpose is to have a foundational model for more downstream tasks built on top of it) or Repeat Eligibility Criteria in case of some trials. Working on making it more reliable.
from unsloth import FastLanguageModel
import torch
max_seq_length = 4096
dtype = torch.float16
load_in_4bit = True
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "ArvindSharma18/Phi-3-mini-4k-instruct-bnb-4bit-Clinical-Trail-Merged-Exp", # "unsloth/mistral-7b" for 16bit loading
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit
)
FastLanguageModel.for_inference(model)
inputs = tokenizer(
[
"Write Clinical Trial Summary for Effects of High-protein Milk Supplementation on Muscular Strength and Power, Body Composition, and Skeletal Muscle Regulatory Markers Following Heavy Resistance Training in Resistance-trained Men"
], return_tensors = "pt").to("cuda")
from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer, skip_prompt = True)
_ = model.generate(input_ids = inputs.input_ids, attention_mask = inputs.attention_mask,
streamer = text_streamer, max_new_tokens = 4096, do_sample=True)
Uploaded model
- Developed by: ArvindSharma18
- Finetuned from model : unsloth/Phi-3-mini-4k-instruct-bnb-4bit