Downloads · 30 days
9
5% of all-time downloads
AhmedBou/databricks-dolly-v2-3b_for_clinical_terms_synonyms
databricks-dolly-v2-3b_for_clinical_terms_synonyms is a machine learning model from AhmedBou. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
The following bitsandbytes quantization config was used during training: - loadin8bit: False - loadin4bit: True - llmint8threshold: 6.0 - llmint8skipmodules: None - llmint8enablefp32cpuoffload: False - llmint8hasfp16w…
Downloads · 30 days
9
5% of all-time downloads
All-time downloads
191
Public
Repo size
10.5 MB
Likes
1
Public
Click a slice to open those files.
.bin10.5 MB · 100%
From the Hugging Face model README
The following bitsandbytes quantization config was used during training:
import torch
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer
peft_model_id = "AhmedBou/databricks-dolly-v2-3b_for_clinical_terms_synonyms"
config = PeftConfig.from_pretrained(peft_model_id)
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto')
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
# Load the Lora model
model = PeftModel.from_pretrained(model, peft_model_id)
input_text = "participant safety -->: "
batch = tokenizer(input_text, return_tensors='pt')
with torch.cuda.amp.autocast():
output_tokens = model.generate(**batch, max_new_tokens=50)
print('\n\n', tokenizer.decode(output_tokens[0], skip_special_tokens=True))