Text Generation
Transformers
PyTorch
Ukrainian
llama
text-generation-inference

Run this model with HF Jobs

Run ponoma16/CodeKobzar13B 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/ponoma16/CodeKobzar13B. 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/ponoma16/CodeKobzar13B 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/ponoma16/CodeKobzar13B. 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/ponoma16/CodeKobzar13B. 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.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="ponoma16/CodeKobzar13B")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("ponoma16/CodeKobzar13B")
model = AutoModelForCausalLM.from_pretrained("ponoma16/CodeKobzar13B", device_map="auto")
Quick Links

Introduction

CodeKobzar13B is a generative model that was trained on Ukrainian Wikipedia data and Ukrainian language rules. It has knowledge of Ukrainian history, language, literature and culture.

Model Information

This model is based on vicuna-13b-v1.5.

Model Usage

Use the following prompt template:
USER: {input} ASSISTANT:

We recommend using next configurations:

Temperature: 0.8
Top-p: 0.95

Inference

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_path="ponoma16/CodeKobzar13B"

tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
                            model_load_path,
                            low_cpu_mem_usage=True,
                            torch_dtype=torch.float16,
                            load_in_8bit=True,
                            device_map='auto',
                        )
model.eval()

prompt = "Яке місто в Україні називають найромантичнішим?"

PROMPT_TEMPLATE = """USER: {prompt} ASSISTANT: """

input_ids = tokenizer(
                prompt,
                return_tensors="pt",
                truncation=True,
            ).input_ids.cuda()
outputs = model.generate(
            input_ids=input_ids,
            do_sample=True,
            top_p=0.95,
            max_new_tokens=150,
            temperature=0.5,
        )
prediction = tokenizer.batch_decode(outputs.cpu().numpy(), skip_special_tokens=True)[0]
print(prediction)

Contact

If you have any inquiries, please feel free to raise an issue or reach out to us via email at: mariiaponomarenko10@gmail.com, benjamin.ye@me.com. We're here to assist you!"

Downloads last month
22
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ponoma16/CodeKobzar13B

Quantizations
1 model

Datasets used to train ponoma16/CodeKobzar13B