Downloads · 30 days
12
2% of all-time downloads
dfurman/Llama-2-7B-Instruct-v0.1
Llama-2-7B-Instruct-v0.1 is a text generation model from dfurman. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as unknown.
Downloads · 30 days
12
2% of all-time downloads
All-time downloads
657
Public
Repo size
539 MB
Likes
1
Public
Click a slice to open those files.
.bin269 MB · 50%
From the Hugging Face model README
This instruction model was built via parameter-efficient QLoRA finetuning of Llama-2-7b on the first 5k rows of ehartford/dolphin and the first 5k rows of garage-bAInd/Open-Platypus. Finetuning was executed on 1x A100 (40 GB SXM) for roughly 2 hours on the Lambda Labs platform.
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 44.5 |
| ARC (25-shot) | 51.19 |
| HellaSwag (10-shot) | 78.92 |
| MMLU (5-shot) | 46.63 |
| TruthfulQA (0-shot) | 48.5 |
| Winogrande (5-shot) | 74.43 |
| GSM8K (5-shot) | 5.99 |
| DROP (3-shot) | 5.82 |
We use the Language Model Evaluation Harness to run the benchmark tests above, using the same version as Hugging Face's Open LLM Leaderboard.

The above loss curve was generated from the run's private wandb.ai log.
The following language is modified from EleutherAI's GPT-NeoX-20B
This model can produce factually incorrect output, and should not be relied on to produce factually accurate information. This model was trained on various public datasets. While great efforts have been taken to clean the pretraining data, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
!pip install -q -U huggingface_hub peft transformers torch accelerate
from huggingface_hub import notebook_login
import torch
from peft import PeftModel, PeftConfig
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
pipeline,
)
notebook_login()
peft_model_id = "dfurman/Llama-2-7B-Instruct-v0.1"
config = PeftConfig.from_pretrained(peft_model_id)
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
model = AutoModelForCausalLM.from_pretrained(
config.base_model_name_or_path,
quantization_config=bnb_config,
use_auth_token=True,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path, use_fast=True)
tokenizer.pad_token = tokenizer.eos_token
model = PeftModel.from_pretrained(model, peft_model_id)
format_template = "You are a helpful assistant. {query}\n"
# First, format the prompt
query = "Tell me a recipe for vegan banana bread."
prompt = format_template.format(query=query)
# Inference can be done using model.generate
print("\n\n*** Generate:")
input_ids = tokenizer(prompt, return_tensors="pt").input_ids.cuda()
with torch.autocast("cuda", dtype=torch.bfloat16):
output = model.generate(
input_ids=input_ids,
max_new_tokens=512,
do_sample=True,
temperature=0.7,
return_dict_in_generate=True,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.pad_token_id,
repetition_penalty=1.2,
)
print(tokenizer.decode(output["sequences"][0], skip_special_tokens=True))
coming
This model was finetuned by Daniel Furman on Sep 10, 2023 and is for research applications only.
The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please cosult an attorney before using this model for commercial purposes.
coming
The following bitsandbytes quantization config was used during training:
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 50.94 |
| AI2 Reasoning Challenge (25-Shot) | 51.19 |
| HellaSwag (10-Shot) | 78.92 |
| MMLU (5-Shot) | 46.63 |
| TruthfulQA (0-shot) | 48.50 |
| Winogrande (5-shot) | 74.43 |
| GSM8k (5-shot) | 5.99 |