Instructions to use arunn7/fine-tuned-code-analyzer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use arunn7/fine-tuned-code-analyzer with PEFT:
from peft import PeftModel from transformers import AutoModelForSeq2SeqLM base_model = AutoModelForSeq2SeqLM.from_pretrained("Salesforce/codet5p-220m") model = PeftModel.from_pretrained(base_model, "arunn7/fine-tuned-code-analyzer") - Transformers
How to use arunn7/fine-tuned-code-analyzer with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("arunn7/fine-tuned-code-analyzer", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| {% if not add_generation_prompt is defined %} | |
| {% set add_generation_prompt = false %} | |
| {% endif %} | |
| {%- set ns = namespace(found=false) -%} | |
| {%- for message in messages -%} | |
| {%- if message['role'] == 'system' -%} | |
| {%- set ns.found = true -%} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {{bos_token}}{%- if not ns.found -%} | |
| {{'You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer\n'}} | |
| {%- endif %} | |
| {%- for message in messages %} | |
| {%- if message['role'] == 'system' %} | |
| {{ message['content'] }} | |
| {%- else %} | |
| {%- if message['role'] == 'user' %} | |
| {{'### Instruction:\n' + message['content'] + '\n'}} | |
| {%- else %} | |
| {{'### Response:\n' + message['content'] + '\n<|EOT|>\n'}} | |
| {%- endif %} | |
| {%- endif %} | |
| {%- endfor %} | |
| {% if add_generation_prompt %} | |
| {{'### Response:'}} | |
| {% endif %} |