Run this model with HF Jobs

Run yezdata/EmCoder 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/yezdata/EmCoder. 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/yezdata/EmCoder 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.
File size: 841 Bytes
a10898b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from transformers import PretrainedConfig


class EmCoderConfig(PretrainedConfig):
    model_type = "emcoder"

    def __init__(
        self,
        vocab_size=50368,
        d_model=768,
        n_head=12,
        n_layers=6,
        d_ffn=2048,
        dropout=0.1,
        num_labels=28,
        base_encoder_path="",
        id2label=None,
        label2id=None,
        **kwargs,
    ):
        if id2label is not None:
            id2label = {int(k): v for k, v in id2label.items()}

        super().__init__(id2label=id2label, label2id=label2id, **kwargs)
        self.vocab_size = vocab_size
        self.d_model = d_model
        self.n_head = n_head
        self.n_layers = n_layers
        self.d_ffn = d_ffn
        self.dropout = dropout
        self.num_labels = num_labels
        self.base_encoder_path = base_encoder_path