Text Generation
Transformers
PyTorch
Polish
gpt2
text-generation-inference

Run this model with HF Jobs

Run Lajonbot/LaMini-Cerebras-256M-8000-steps-polish 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/Lajonbot/LaMini-Cerebras-256M-8000-steps-polish. 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/Lajonbot/LaMini-Cerebras-256M-8000-steps-polish 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/Lajonbot/LaMini-Cerebras-256M-8000-steps-polish. 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/Lajonbot/LaMini-Cerebras-256M-8000-steps-polish. 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.

Introduction

These repository consist of LaMini-Cerebras-256M finetuned to Polish language on translated alpaca-dolly dataset. Main task is to perform accurate answers to instruction asked.

Below you can find an instruction of how to infer with that model. These repository does not contain an tokenizer object, at the moment (#TODO).

Evaluation part



import pandas as pd
import torch
from torch.utils.data import AutTokenizer
from typing import List, Dict, Union
from typing import Any, TypeVar

import pandas as pd
import pickle 

MODEL_NAME: str = 'Lajonbot/LaMini-Cerebras-256M-8000-steps-polish'
  
  
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
model = AutoModelForCasualLM.from_pretrained(MODEL_NAME).cuda()
#Resize model  for tokenizer size 
n_tokens: int = len(tokenizer)
model.resize_token_embeddings(n_tokens)


def _generate_prompt(instruction, input=None):
    if input:
        return f"""Poniżej znajduje się instrukcja opisująca zadanie, połączona z danymi wejściowymi, które zapewniają dalszy konktekst. Napisz odpowiedź, która odpowiednio odpowie na pytanie.
### Instruction:
{instruction}
### Input:
{input}
### Response:"""

manual_instruction: str = "Napisz mi proszę jakie są rodzaje telefonów komórkowych"
manual_input: str = "Telefony komórkowe, w przeciwieństwie do np. satelitarnych, charakteryzuje to, że działają w obrębie naziemnych fal radiowych w technologii GSM (i w różnych jej wariantach: 3G, 4G czy niebawem 5G). Zasadniczo można jednak wyróżnić wiele ich rodzajów i podzielić je na różne kryteria. I tak, ze względu na rodzaj obudowy, można mówić o telefonach jednobryłowych, rozsuwanych, obrotowych czy też z klapką. Obecnie jednak najbardziej popularne i – ze względu na posiadane parametry – najlepsze telefony komórkowe to smartfony dotykowe."

print(f"Valueation for {manual_instruction} \n\n\n  {manual_input}\n\n")
evaluate(instruction = manual_instruction, 
         input = manual_input)  
Downloads last month
23
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Datasets used to train Lajonbot/LaMini-Cerebras-256M-8000-steps-polish