Model Card for Model ID

Instruct model for python code generation.

Uses

Using for code editor assistant, code generation

Direct Use

system_prompt="""
You are expert Python programmer. You task contians follwing instructions. 
You should answer the user questions about python. 
Write the python syntax based on the use instructions.
The output format must contain only python codes after ```python phrase.
You must use the the user input vairables in your code as code place holder.
"""

messages = [
    {'role':'system','content':system_prompt},
    {"role": "user", "content":"Write a dijesktra path finder algorithm in python and execute it." },
]
inputs = tokenizer.apply_chat_template(
    messages,
    tokenize = True,
    add_generation_prompt = True, # Must add for generation
    return_tensors = "pt",
).to("cuda")

from transformers import TextStreamer
text_streamer = TextStreamer(tokenizer, skip_prompt = True)
_ = model.generate(input_ids = inputs, streamer = text_streamer, max_new_tokens =512,
                   use_cache = True, temperature = 0.3, min_p = 0.9)


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

Model tree for alibidaran/LLAMA3-intructive_Python

Finetuned
(1316)
this model

Dataset used to train alibidaran/LLAMA3-intructive_Python