datasets
Training and evaluation data, with the modality, task and licence stated up front. Listed live from the Hugging Face Hub.
phi2_rejection_sampling
Phi-2 Rejection Sampling
The Phi-2 Rejection Sampling dataset is an English-language dataset consisting of 10 prompts and responses generated by Phi-2 and graded by the OpenAssistant's reward model.
Dataset Details
Dataset Description
The Phi-2 Rejection Sampling dataset is a small (n = 10) English-language dataset. This dataset was created with the purpose was to demonstrate a feedback pipeline where in which Phi-2 would interact with the OpenAssistant reward… See the full description on the dataset page: https://huggingface.co/datasets/BluefinTuna/phi2_rejection_sampling.microsoft-phi2-mental-healthphi2_finetune_datasetphi2phi2-4000-datasetphi2_modelresultsModel used-
Phi-2
2.7B parameter(https://huggingface.co/microsoft/phi-2)
Code-
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2")
model=AutoModelForCausalLM.from_pretrained("microsoft/phi-2",device_map="cuda") #load the model
#print(model.device)
def ask(question: str, max_new_tokens: int = 256) -> str:
prompt = f"Instruct: {question}\nOutput:"
inputs = tokenizer(prompt… See the full description on the dataset page: https://huggingface.co/datasets/Ayesharifa02/phi2_modelresults.
