Downloads · 30 days
0
zhiqings/dromedary-2-70b-qlora-delta-v1
dromedary-2-70b-qlora-delta-v1 is a machine learning model from zhiqings. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as llama2.
<div style="display: flex; justify-content: center; align-items: center;" <img src="https://raw.githubusercontent.com/IBM/SALMON/main/assets/images/salmonlogowithtext.jpeg" alt="SALMON Logo" style="height: 256px; marg…
Downloads · 30 days
0
Access
Public
Updated Oct 11, 2023
Repo size
1.7 GB
Likes
3
Public
Click a slice to open those files.
.bin1.7 GB · 100%
From the Hugging Face model README
Model type: Dromedary-2 is an open-source self-aligned language model trained in minimal human supervision with the SALMON (Self-Alignment with Principle-Following Reward Models) technique. The base language model is LLaMA-70b, based on the transformer architecture.
NOTE: Dromedary-2 is trained with QLoRA and the bfloat16 data type. While it is possible to merge the QLoRA weights with the quantized model and thus enable inference with libraries such as TGI and vLLM, we found the merged weights can lead to degenerated performance. Therefore, we recommend directly loading the QLoRA weights with the PEFT-LoRA framework.
Please check the inference section of our repo for the complete inference code.
system_prompt = (
"# Dromedary\n\n## System Overview\n\n"
"Consider an AI assistant whose codename is Dromedary, developed by the Self-Align team. "
"Dromedary is trained on data up until Sept-2022, and it endeavors to be a helpful, ethical and reliable assistant.\n\n"
"## User Conversation\n\n"
)
user_prompt = "### User\n"
assistant_prompt = "### Dromedary\n"
seperator = "\n\n"
dtype = torch.bfloat16
model_path = "path/to/llama-2-70b-hf"
qlora_path = "path/to/dromedary-2-70b-qlora-delta-v0" # i.e., this model hub
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=dtype,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
)
model = AutoModelForCausalLM.from_pretrained(
model_path,
load_in_4bit=True,
device_map={"": "cuda:0"},
quantization_config=bnb_config,
torch_dtype=dtype,
)
model = PeftModel.from_pretrained(
model,
qlora_path,
is_trainable=False,
)
Model date: Dromedary-2 was trained between July 2023 and Aug 2023, but its knowledge only goes up until Sept-2022.
License: LLaMA-2's bespoke license
Paper or resources for more information: https://arxiv.org/abs/2310.05910
Where to send questions or comments about the model: https://github.com/IBM/SALMON/issues
Organizations developing the model: The Self-Align team is a joint effort between CMU and IBM.
Primary intended uses: The primary use of Dromedary is research on the alignment of large language models.
Primary intended users: The primary intended users of the model are researchers in artificial intelligence.
6 In-Context Learning (ICL) exemplars
90K unlabeled prompts from ShareGPT
10K unlabeled prompts from databricks-dolly-15k
10K unlabeled prompts from OpenAssistant Conversations
40K unlabeled prompts from OpenOrca
7.5K unlabeled prompts from MATH
We evaluate Dromedary-2 on: