Run this model with HF Jobs

Run bigcode/starcoder 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 and TRL to fine-tune https://huggingface.co/bigcode/starcoder. Ask me which dataset to train on, then push the fine-tuned model to a new private 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/bigcode/starcoder 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.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/bigcode/starcoder. Ask me which benchmark to run, then save the scores and the per-example results to a new private dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/bigcode/starcoder. Push it to a new private model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Remove input id tokens

#87
by satsat - opened

Hi,

Scenario: I have got 5 files , which has code in it. Now I am trying to evaluate the files and get some recommendations via starcoder model.

Challenge: I am able to iterate thru all files and get recommendations independently. But when running in a single flow in a loop, after the first file is encoded and decoded, for the second file, the input_ids of the previous file remains. How to remove the input_ids tokens of the previous file.

for each file
input_ids: torch.Tensor = self.tokenizer.encode(query, max_length=7000, return_tensors='pt', truncation=True).to(self.device)
print(len(input_ids[0]))

For example:
1st file: Len of input IDs is , 1111
2nd file[2nd iteration]: Len of input IDs is, 3018 [but it should 1907]

Please help with a solution for this. Thanks.

Sign up or log in to comment