Run this model with HF Jobs

Run Ponimash/FredInterpreter 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/Ponimash/FredInterpreter. 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/Ponimash/FredInterpreter 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.

Usage

def qa(doc, q):
  doc = doc.replace('\n',' ')
  q = q.replace('\n',' ')
  q_pr = f'<SC6>Опираясь на информацию: {doc}\n ответь на вопрос: \"{q}\".\n Ответ: '
  data_inp = tokenizer(q_pr, return_tensors="pt").to('cuda:0')
  return data_inp

def generate(doc, q):
  t = qa(doc, q)
  output_ids = model.generate(
      **t,  do_sample=False, temperature=0.0, max_new_tokens=512, repetition_penalty=1, no_repeat_ngram_size=8
  )[0]
  out = tokenizer.decode(output_ids.tolist(), skip_special_tokens=True)
  out = out.replace("<extra_id_0>","")
  ans_sqs = sent_tokenize(out, language="russian")
  ans = ' '.join(ans_sqs[:3])
  return ans.split('Ответ:')[0].split('Вопрос:')[0]
Downloads last month
5
Safetensors
Model size
2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support