Run this model with HF Jobs

Run OpenRussianAI/andrey 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/OpenRussianAI/andrey. 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/OpenRussianAI/andrey 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/OpenRussianAI/andrey. 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.
andrey / configuration_easyformer.py
XBFDI's picture
Update configuration_easyformer.py
ffe4b06 verified
Raw History Blame
1.14 kB
# configuration_easyformer.py
from transformers import PretrainedConfig
class EasyFormerConfig(PretrainedConfig):
model_type = "transformer"
def __init__(
self,
vocab_size=8000,
d_model=192,
n_layer=5,
n_head=4,
ctx=128,
dropout=0.1,
**kwargs,
):
super().__init__(**kwargs)
self.vocab_size = vocab_size
self.d_model = d_model
self.n_layer = n_layer
self.n_head = n_head
self.ctx = ctx
self.dropout = dropout
# --- HF-совместимые property ---
@property
def num_hidden_layers(self):
return self.n_layer
@property
def hidden_size(self):
return self.d_model
@property
def num_attention_heads(self):
return self.n_head
@property
def intermediate_size(self):
return 2 * self.d_model
@property
def max_position_embeddings(self):
return self.ctx
@property
def num_key_value_heads(self):
return self.n_head
@property
def head_dim(self):
return self.d_model // max(1, self.n_head)