Downloads · 30 days
5
2% of all-time downloads
ArvindSharma18/Phi-3-mini-4k-instruct-bnb-4bit-Clinical-Trail-Merged
Phi-3-mini-4k-instruct-bnb-4bit-Clinical-Trail-Merged is a text generation model from ArvindSharma18. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as creativeml-openrail-m.
- This is an Experiment to generate Clinical Report Information given some of the attributes which I have trained on. Will be making a better one Soon! Stay Updated - LORA: ArvindSharma18/Phi-3-mini-4k-instruct-bnb-4b…
Downloads · 30 days
5
2% of all-time downloads
All-time downloads
230
Public
Repo size
15.3 GB
Likes
0
Public
Click a slice to open those files.
.bin7.6 GB · 100%
From the Hugging Face model README
Note: EOS issue. Will keep on Generating Secondary Outcomes.
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",
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit
)
FastLanguageModel.for_inference(model)
inputs = tokenizer(
[
"Official Title: Randomized Trial of Usual Care vs. Specialized, Phase-specific Care for Youth at Risk for Psychosis"
], 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 = 2048, pad_token_id = tokenizer.eos_token_id)
This model was trained 2x faster with Unsloth and Huggingface's TRL library.