AlgorithmicResearchGroup/phi-biology
026
1---2license: apache-2.03language:4- en5pipeline_tag: summarization6widget:7- text: What is the peak phase of T-eV?8 example_title: Question Answering9tags:10- arxiv11---12# Table of Contents13 140. [TL;DR](#TL;DR)151. [Model Details](#model-details)162. [Usage](#usage)173. [Uses](#uses)184. [Citation](#citation)19 20# TL;DR21 22This is a Phi-1_5 model trained on [camel-ai/biology](https://huggingface.co/datasets/camel-ai/biology). This model is for research purposes only and ***should not be used in production settings***.23 24 25## Model Description26 27 28- **Model type:** Language model29- **Language(s) (NLP):** English30- **License:** Apache 2.031- **Related Models:** [Phi-1_5](https://huggingface.co/microsoft/phi-1_5)32 33# Usage34 35Find below some example scripts on how to use the model in `transformers`:36 37## Using the Pytorch model38 39```python40 41from huggingface_hub import notebook_login42from datasets import load_dataset, Dataset43from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer44 45model = "ArtifactAI/phi-biology"46 47model = AutoModelForCausalLM.from_pretrained(base_model, trust_remote_code= True)48tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)49 50def generate(prompt):51 inputs = tokenizer(f'''Below is an instruction that describes a task. Write a response that appropriately completes the request If you are adding additional white spaces, stop writing".\n\n### Instruction:\n{prompt}.\n\n### Response:\n ''', return_tensors="pt", return_attention_mask=False)52 streamer = TextStreamer(tokenizer, skip_prompt= True)53 _ = model.generate(**inputs, streamer=streamer, max_new_tokens=500)54 55generate("What are the common techniques used in identifying a new species, and how can scientists accurately categorize it within the existing taxonomy system?")56```57 58## Training Data59 60The model was trained on [camel-ai/biology](https://huggingface.co/datasets/camel-ai/biology), a dataset of question/answer pairs. Questions are generated using the t5-base model, while the answers are generated using the GPT-3.5-turbo model.61 62# Citation63 64```65@misc{phi-math,66 title={phi-biology},67 author={Matthew Kenney},68 year={2023}69}70```