Run this model with HF Jobs
Run valhalla/awesome-model 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/valhalla/awesome-model. 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/valhalla/awesome-model 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.
Instructions to use valhalla/awesome-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use valhalla/awesome-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="valhalla/awesome-model", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("valhalla/awesome-model", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
add model
Browse filesFiles changed (4)
- config.jsonAdded+14
- config.pyAdded+10
- model.pyAdded+17
- pytorch_model.binAdded+3
1234567891011121314{ "architectures": [ "AwesomeModel" ], "attribute": 1, "auto_map": { "AutoConfig": "config.AwesomeConfig", "AutoModel": "model.AwesomeModel" }, "hidden_size": 16, "model_type": "awesome", "torch_dtype": "float32", "transformers_version": "4.17.0.dev0"}12345678910from transformers import PretrainedConfig
class AwesomeConfig(PretrainedConfig): model_type = "awesome"
def __init__(self, attribute=1, **kwargs): self.attribute = attribute self.hidden_size = 16 super().__init__(**kwargs)1234567891011121314151617import torch
from transformers import PreTrainedModel
from .config import AwesomeConfig
class AwesomeModel(PreTrainedModel): config_class = AwesomeConfig base_model_prefix = "base"
def __init__(self, config): super().__init__(config) self.linear = torch.nn.Linear(config.hidden_size, config.hidden_size)
def forward(self, x): return self.linear(x)123version https://git-lfs.github.com/spec/v1oid sha256:37ab646b69a0f3771e34a402e9b85bc5d5124ea888d4c06d56103adbf4d98241size 2243config.jsonAdded+14
config.pyAdded+10
model.pyAdded+17
pytorch_model.binAdded+3