--- license: mit datasets: - SE6446/Pippa_alpaca_completion - PygmalionAI/PIPPA pipeline_tag: conversational --- ```ascii _ (`-. ('-. .-. ('-. .-') _ .-') _ .-') _ ( (OO )( OO ) / ( OO ).-. ( OO ).( '.( OO )_ ( ( OO) ) _.` \,--. ,--. / . --. /(_)---\_),--. ,--.) ,-.-') \ .'_ (__...--''| | | | | \-. \ / _ | | `.' | | |OO),`'--..._) | / | || .| |.-'-' | |\ :` `. | | | | \| | \ ' | |_.' || | \| |_.' | '..`''.)| |'.'| | | |(_/| | ' | | .___.'| .-. | | .-. |.-._) \| | | | ,| |_.'| | / : | | | | | | | | | |\ /| | | |(_| | | '--' / `--' `--' `--' `--' `--' `-----' `--' `--' `--' `-------' ``` This model is a fine-tuned version of [microsoft/phi-1_5](https://huggingface.co./microsoft/phi-1_5) on the PIPPA dataset. The last phasmid model for a while, lucky its a good one. ## Model description This is a Microsoft/Phi-1_5 model finetuned to persona conversation using a formatted version of the PIPPA dataset (See below.) ## Intended uses & limitations This model is intended for research purposes only. Due to the nature of the dataset, the model can produce NSFW response in certain scenarios. Unless you're okay with that please consider applying a filter or finetuning on a SFW dataset. ## Model inference ### Transformers Phi doesn't support device_map "auto", and does not want to inference in fp16, so use bf16. Thus you should use the following code for inference ```python import torch from transformers import AutoModelForCausalLM, AutoTokenizer torch.set_default_device('cuda') model = AutoModelForCausalLM.from_pretrained("SE6446/Phasmid-1_5-V0_5", trust_remote_code=True, torch_dtype="auto") tokenizer = AutoTokenizer.from_pretrained("SE6446/Phasmid-1_5-V0_5", trust_remote_code=True, torch_dtype="auto") inputs = tokenizer('### Instruction: Penguinotron\'s persona:\n Penguinotron is a robotic guardian of all penguins. He will kill any one who attempts to harm penguins.\n\n\n### Input: Oliver: Hello penguinotron!\n ### Output (length=any): Penguinotron:', return_tensors="pt", return_attention_mask=False) outputs = model.generate(**inputs, max_length=200) text = tokenizer.batch_decode(outputs)[0] print(text) ``` ### Web UIs Can be installed normally or via git... ``` cd {{Insert model dir}} git lfs install git clone https://huggingface.co./SE6446/Phasmid-1_5-V0_5 ``` (**Remember to turn on 'trust_remote_code'**) ### Formatting Formatting should be this variation of the Alpaca format. ``` ### Instruction: {Character card infomation} ### Input: {{user}}: {{prompt}} ### Output (length = any): {{char}}: ``` Model will output after char. ## Known issues This model is small and as such suffers from problematic hallucinations, it may produce erratic outputs or behave unrealistically based on the current context.