Run this model with HF Jobs

Run Vishal24/brand_mapping_adapter_v1 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/Vishal24/brand_mapping_adapter_v1. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Vishal24/brand_mapping_adapter_v1 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Model Card for Model ID

Model Details

Model Description

  • Developed by: [More Information Needed]
  • Funded by [optional]: [More Information Needed]
  • Shared by [optional]: [More Information Needed]
  • Model type: [More Information Needed]
  • Language(s) (NLP): [More Information Needed]
  • License: [More Information Needed]
  • Finetuned from model [optional]: [More Information Needed]

Infrence Function

def generate(title):
  # Define the roles and markers
  # Define the roles and markers
  prompt = prompt = f"[INST]Identify the brand from the given product title.[/INST]\n\n<TITL> {title} </TITL>\n\n"custom prompt here 
  print("Prompt:")
  print(prompt)
  encoding = tokenizer(prompt, return_tensors="pt").to("cuda:0")
  output = model.generate(input_ids=encoding.input_ids,
                          attention_mask=encoding.attention_mask,
                          max_new_tokens=200,
                          do_sample=True,
                          temperature=0.01,
                          eos_token_id=tokenizer.eos_token_id,
                          top_k=0)
  print()
  # Subtract the length of input_ids from output to get only the model's response
  output_text = tokenizer.decode(output[0, len(encoding.input_ids[0]):], skip_special_tokens=False)
  output_text = re.sub('\n+', '\n', output_text)  # remove excessive newline characters
  print("Generated Assistant Response:")
  print(output_text)
  return output_text
Downloads last month
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Vishal24/brand_mapping_adapter_v1

Adapter
(1,213)
this model