Run this model with HF Jobs

Run lilmeaty/text-gen-example-one-layer 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/lilmeaty/text-gen-example-one-layer. 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/lilmeaty/text-gen-example-one-layer 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/lilmeaty/text-gen-example-one-layer. 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 https://huggingface.co/lilmeaty/text-gen-example-one-layer. 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.

Modelo Ajustado para Generaci贸n de Texto

Este modelo ha sido ajustado a partir de gpt2 con la siguiente configuraci贸n:

  • N煤mero de capas ocultas: 1
  • Tama帽o de la capa oculta: 2
  • Tama帽o del vocabulario: 50259

Importante: Este modelo utiliza la arquitectura base de gpt2 y ha reducido su tama帽o. El modelo original ten铆a 12 capas, y ahora tiene solo 1 capa oculta. Adem谩s, la dimensi贸n de los embeddings y las capas internas se ha ajustado a 2. Se han a帽adido nuevos tokens al vocabulario y sus embeddings han sido inicializados.

Se puede utilizar para tareas de generaci贸n de texto.

Uso

Para usar este modelo, primero debes tener instalada la librer铆a transformers. Puedes instalarla usando pip:

pip install transformers

Una vez instalada, puedes cargar y usar el modelo de la siguiente manera:

from transformers import AutoModelForCausalLM, AutoTokenizer

repo_name = "lilmeaty/text-gen-example-one-layer"
model = AutoModelForCausalLM.from_pretrained(repo_name)
tokenizer = AutoTokenizer.from_pretrained(repo_name)

prompt = "Escribe una breve historia sobre un robot que aprende a amar."
input_ids = tokenizer.encode(prompt, return_tensors="pt")

output = model.generate(
    input_ids,
    max_length=100,
    num_return_sequences=1,
    no_repeat_ngram_size=2,
    top_k=50,
    top_p=0.95,
    temperature=0.7,
    do_sample=True
)

generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)
Downloads last month
24
Safetensors
Model size
892k params
Tensor type
F32
路
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support