CoolFace
Modelpublic

vrpatel/power-converter

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes7downloads
Model Card

Model Description

The power-converter model provides responses to aid with queries about power electronic converters. The model underwent SFT using QloRA on Microsoft's Phi-3-Mini-4K-Instruct using a fully synthetic dataset.

  • Developed by: Vinesh Patel
  • Finetuned from model: microsoft/Phi-3-mini-4k-instruct
  • Acknowledgement:
  • This work has used Durham University’s NCC cluster. NCC has been purchased through Durham University’s strategic investment funds, and is installed and maintained by the Department of Computer Science.
  • This work made use of the facilities of the N8 Centre of Excellence in Computationally Intensive Research (N8 CIR) provided and funded by the N8 research partnership and EPSRC (Grant No. EP/T022167/1). The Centre is coordinated by the Universities of Durham, Manchester and York.
  • Repository: [More Information Needed]
  • Paper: [More Information Needed]

Getting Started

Use the code below to get started with the model.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "vrpatel/power-converter",
    device_map="auto",
    torch_dtype="auto")
tokenizer = AutoTokenizer.from_pretrained("vrpatel/power-converter")

messages = [ 
    {"role": "system", "content": "You are a helpful assistant knowledgeable about power converters."}, 
    {"role": "user", "content": <user_input>"} 
]
inputs = tokenizer.apply_chat_template(
        messages,
        add_generation_prompt=True,
        return_dict=True,
        return_tensors="pt"
    ).to(model.device)

outputs = model.generate(
        **inputs, 
        max_new_tokens=2048,
        do_sample=True
    )

response = tokenizer.decode(
    outputs[0][len(inputs.input_ids[0]):], 
    skip_special_tokens=True
)