--- library_name: transformers tags: - trl - sft - python - code - conversational license: mit --- # Model Card for Assistant-Coding-Python ## Model Details ### Model Description Assistant-Coding-Python is a fine-tuned causal language model based on **SmolLM2-360M**. It is specifically trained to assist and answer various Python programming questions, ranging from implementing basic mathematical functions to data structure manipulation. - **Developed by:** Fadilahnuryasin - **Model type:** Causal Language Model (Fine-tuned with Supervised Fine-Tuning) - **Language(s) (NLP):** English, Python - **License:** MIT - **Finetuned from model:** HuggingFaceTB/SmolLM2-360M ## Uses ### Direct Use This model is designed to act as a coding assistant, helping users write Python code, solve basic logic problems, and understand Python syntax. ### Out-of-Scope Use This model is not designed for deployment in critical systems requiring high safety verification or complex, enterprise-scale code generation without human supervision. ## Bias, Risks, and Limitations As a small-scale model (360M parameters), it may occasionally produce inaccurate outputs on complex mathematical logic or incorrectly predict final execution results. Users are advised to review and test all generated code before use. ## How to Get Started with the Model Use the code below to get started with the model using the Transformers library: ```python from transformers import pipeline pipe = pipeline("text-generation", model="Fadilahnuryasin/Assistant-Coding-Python") messages = [ {"role": "system", "content": "You are an expert and helpful Python programming assistant."}, {"role": "user", "content": "Create a Python function to calculate the area of a rectangle."} ] prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) outputs = pipe(prompt, max_new_tokens=200, do_sample=True, temperature=0.2) print(outputs[0]["generated_text"])