hf_mirrors/gemma-2b-alpaca-sft
Model Introduction
Files & versions
Analysis

Uploaded model

  • Developed by: venkateshmurugadas
  • License: apache-2.0
  • Finetuned from model : google/gemma-2b

This gemma model was trained 2x faster with Unsloth and Huggingface's TRL library.

Modification

  • Modify examples and add npu support;
  • Modify dependencies;

Code Usage(core part)

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-2b-alpaca-sft",
  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"])