Run this model with HF Jobs

Run JetBrains-Research/OpenCoder-1.5B-Masked-Leak 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 /JetBrains-Research/OpenCoder-1.5B-Masked-Leak. 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 /JetBrains-Research/OpenCoder-1.5B-Masked-Leak 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 /JetBrains-Research/OpenCoder-1.5B-Masked-Leak. Ask me which benchmark to run, then save the scores and the per-example results to a new 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 /JetBrains-Research/OpenCoder-1.5B-Masked-Leak. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Description

This model is derived from OpenCoder-1.5B-Base by applying additional context extension fine-tuning. The repository context is composed using the Masked Leak composer, more details on which, along with others, can be found in the On Pretraining for Project-Level Code Completion paper (arxiv). Specifically, Section A.1 of the Appendix describes the context composition method, and Table 3 provides a comparison with other composers from the same collection.

We publish this checkpoint to support the reproducibility and accessibility of our research results.

Quickstart

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "JetBrains-Research/OpenCoder-1.5B-Masked-Leak"
tokenizer_name = "infly/OpenCoder-1.5B-Base"

model = AutoModelForCausalLM.from_pretrained(model_name,
                                             torch_dtype=torch.bfloat16,
                                             device_map="auto",
                                             trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(tokenizer_name, trust_remote_code=True)

inputs = tokenizer("# write a quick sort algorithm", return_tensors="pt")
outputs = model.generate(**inputs.to(model.device), max_new_tokens=256)

result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
Downloads last month
207
Safetensors
Model size
2B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for JetBrains-Research/OpenCoder-1.5B-Masked-Leak

Finetuned
(36)
this model

Collection including JetBrains-Research/OpenCoder-1.5B-Masked-Leak

Paper for JetBrains-Research/OpenCoder-1.5B-Masked-Leak