transformers safetensors gemma text-generation ko license:apache-2.0 autotrain_compatible endpoints_compatible text-generation-inference region:us
---
license: apache-2.0
language:
- ko
pipeline_tag: text-generation
tags:
- gemma
---

### BaseModel
 - [google/gemma-7b](https://huggingface.co/google/gemma-7b)
   
### Model Generation

```
from transforemrs import AutoTokenizer, AutoModelForCausalLM

model = AutoModelForCausalLM.from_pretrained("AIdenU/Gemma-7b-ko-Y24_v2.0", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("AIdenU/Gemma-7b-ko-Y24_v2.0", use_fast=True)

systemPrompt = "당신은 유능한 AI입니다."
prompt = "지렁이도 밟으면 꿈틀하나요?"
outputs = model.generate(
  **tokenizer(
    f"### instruction: {system}\n{prompt} \n### output: ",
    return_tensors='pt'
  ).to('cuda'),
  max_new_tokens=256,
  temperature=0.2,
  top_p=1,
  do_sample=True
)
print(tokenizer.decode(outputs[0]))
```