chansurgeplus's picture
Update README.md
1eb5ccf verified
|
raw
history blame
3.51 kB
metadata
license: apache-2.0
datasets:
  - Anthropic/hh-rlhf
language:
  - en
pipeline_tag: text-generation
tags:
  - text-generation-inference

OpenBezoar-HH-RLHF-SFT

The OpenBezoar-HH-RLHF-SFT is an LLM that has been further instruction fine tuned version of OpenBezoar-SFT model on a subset of Anthropic's HH-RLHF Dataset.

Model Details

Model Description

OpenBezoar-HH-RLHF-SFT is an LLM that is built upon the OpenLLaMA 3B v2 architecture. Primary purpose of performing SFT on OpenBezoar-SFT is to minimize the distribution shift before applying Direct Preference Optimization (DPO) for human preferences alignment. For more information please refer to our paper.

Model Sources

  • Repository: [More Information Needed]
  • Paper : [More Information Needed]

Instruction Format

We follow a modified version of the Alpaca prompt template as shown below. It is important to utilize this template in order to obtain best responses for instruction related tasks.

### System:
Below is an instruction that describes a task, optionally paired with an input that provides further context following that instruction. Write a response that appropriately completes the request.

### Instruction:
{instruction}

### Response:

Notice that no end-of-sentence (eos) token is being appended.

Note: The system prompt shown in the following figure is the one that the model has been trained on most of the time. However, you may attempt to use any other system prompt that is available in the Orca scheme.

Usage

from peft import PeftConfig, PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig, AutoModelForSeq2SeqLM

checkpoint =  "SurgeGlobal/OpenBezoar-SFT"

tokenizer = AutoTokenizer.from_pretrained(checkpoint)

model = AutoModelForCausalLM.from_pretrained(
    checkpoint,
    load_in_4bit=True, # optionally for low resource environments
    device_map="auto"
)

prompt =  """### System:
Below is an instruction that describes a task, optionally paired with an input that provides further context following that instruction. Write a response that appropriately completes the request.

### Instruction:
{instruction}

### Response:""".format(
    instruction="What is the world state in the year 1597."
)

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

outputs = model.generate(**inputs, max_new_tokens=1024, do_sample=True)

print(tokenizer.decode(outputs[0]))

Evaluations

Refer to our self-reported evaluations in our paper (Section 4).

Limitations

  • The model might not consistently show improved abilities to follow instructions, and it could respond inappropriately or get stuck in loops.
  • This model is not aligned to human preferences and therefore it may generate harmful and uncensored content.
  • Caution is urged against relying on this model for production or adjacent use-cases.

Citation

If you find our work useful, please cite our paper as follows:

[More Information Needed]

Model Authors

Chandeepa Dissanayake, Lahiru Lowe, Sachith Gunasekara, and Yasiru Ratnayake