Downloads · 30 days
0
Utkarsh524/codellama_utests_full
codellama_utests_full is a text generation model from Utkarsh524. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This is a merged model that combines codellama/CodeLlama-7b-hf with LoRA fine-tuning trained on a dataset of embedded C/C++ functions and corresponding unit tests.
Downloads · 30 days
0
Access
Public
Updated Jun 21, 2025
Parameters
6.7B
13.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors13.5 GB · 100%
From the Hugging Face model README
This is a merged model that combines codellama/CodeLlama-7b-hf with LoRA fine-tuning trained on a dataset of embedded C/C++ functions and corresponding unit tests.
It specializes in generating comprehensive unit tests for C/C++ code using frameworks like GoogleTest or CppUTest, focusing on:
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model = AutoModelForCausalLM.from_pretrained("Utkarsh524/codellama_utests_full")
tokenizer = AutoTokenizer.from_pretrained("Utkarsh524/codellama_utests_full")
prompt = "<|system|>\nGenerate comprehensive unit tests for C/C++ code. Cover all edge cases, boundary conditions, and error scenarios.\nOutput Constraints:\n1. ONLY include test code (no explanations, headers, or main functions)\n2. Start directly with TEST(...)\n3. End after last test case\n4. Never include framework boilerplate\n<|user|>\nCreate tests for:\nint add(int a, int b) { return a + b; }\n<|assistant|>\n"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))