
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# phi-2-OpenHermes-2.5

This model is a fine-tuned version of [microsoft/phi-2](https://huggingface.co/microsoft/phi-2) on the teknium/OpenHermes-2.5 dataset.

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 4
- eval_batch_size: 8
- seed: 42
- distributed_type: multi-GPU
- num_devices: 2
- gradient_accumulation_steps: 16
- total_train_batch_size: 128
- total_eval_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 1.0

### Training results



### Framework versions

- Transformers 4.37.2
- Pytorch 2.0.1+cu117
- Datasets 2.16.1
- Tokenizers 0.15.1

### Inference

``` 
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline

model_id = "minghaowu/phi-2-OpenHermes-2.5"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device_map="auto")

your_instruction = <your_instruction>
infer_prompt = f"### USER: {your_instruction} <|endoftext|>\n### ASSISTANT:"
output = pipe(infer_prompt, do_sample=True, max_new_tokens=256)[0]["generated_text"]
print(output)
```
{"license": "mit", "tags": ["generated_from_trainer"], "datasets": ["teknium/OpenHermes-2.5"], "base_model": "microsoft/phi-2", "model-index": [{"name": "phi-2-OpenHermes-2.5", "results": []}]}
transformers safetensors phi text-generation generated_from_trainer custom_code dataset:teknium/OpenHermes-2.5 base_model:microsoft/phi-2 license:mit autotrain_compatible endpoints_compatible region:us