transformers safetensors mistral text-generation doi:10.57967/hf/1484 license:apache-2.0 autotrain_compatible endpoints_compatible text-generation-inference region:us
---
license: apache-2.0
---

# Mistral 7B V0.1 - Alpaca

```python
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
import torch

tokenizer = AutoTokenizer.from_pretrained("satyajitghana/mistral-7b-v0.1-alpaca-chat")
model = AutoModelForCausalLM.from_pretrained(
    "satyajitghana/mistral-7b-v0.1-alpaca-chat",
    torch_dtype=torch.bfloat16, 
    device_map="auto"
)

pipe = pipeline(
    "text-generation", 
    model=model, 
    tokenizer=tokenizer, 
)

INPUT = """
### Instruction:
List 3 historical events related to the following country

### Input:
India

### Response:
"""

out = pipe(
    INPUT,
    max_new_tokens=200
)

print(out[0]['generated_text'])
```


