Fadilahnuryasin/Assistant-Coding-Python
0412
1---2library_name: transformers3tags:4- trl5- sft6- python7- code8- conversational9license: mit10---11 12# Model Card for Assistant-Coding-Python13 14## Model Details15 16### Model Description17 18Assistant-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.19 20- **Developed by:** Fadilahnuryasin21- **Model type:** Causal Language Model (Fine-tuned with Supervised Fine-Tuning)22- **Language(s) (NLP):** English, Python23- **License:** MIT24- **Finetuned from model:** HuggingFaceTB/SmolLM2-360M25 26## Uses27 28### Direct Use29This model is designed to act as a coding assistant, helping users write Python code, solve basic logic problems, and understand Python syntax.30 31### Out-of-Scope Use32This model is not designed for deployment in critical systems requiring high safety verification or complex, enterprise-scale code generation without human supervision.33 34## Bias, Risks, and Limitations35As 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.36 37## How to Get Started with the Model38 39Use the code below to get started with the model using the Transformers library:40 41```python42from transformers import pipeline43 44pipe = pipeline("text-generation", model="Fadilahnuryasin/Assistant-Coding-Python")45messages = [46 {"role": "system", "content": "You are an expert and helpful Python programming assistant."},47 {"role": "user", "content": "Create a Python function to calculate the area of a rectangle."}48]49prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)50outputs = pipe(prompt, max_new_tokens=200, do_sample=True, temperature=0.2)51print(outputs[0]["generated_text"])