import argparse
import torch
from openmind import pipeline, is_torch_npu_available
from openmind_hub import snapshot_download
if is_torch_npu_available():
device = "npu:0"
else:
device = "cpu"
generate_text = pipeline(
model="SY_AICC/gemma-ko-v01",
torch_dtype=torch.bfloat16,
trust_remote_code=True,
device=device,
)
output = generate_text(
"Why is drinking water so healthy?",
max_new_tokens=100
)
print(output[0]["generated_text"])