Model Card for Model ID
Cesterqwen is a fine-tuned Qwen2.5-1.5B model that is able to generate Libcester unit test cases in the correct format.
Model Details
Model Description
- Developed by: Xavier Woon
Bias, Risks, and Limitations
The model often regenerates the input prompt in the output. This can lead to limited test cases being printed due to truncations based on
max_new_tokens
.Recommendations
Expanding the dataset will help increase the accuracy and robustness of the model, and improve code coverage based on real life scenarios.
How to Get Started with the Model
Use the code below to get started with the model.
from transformers import AutoModelForCausalLM, Qwen2Tokenizer model_name = "xavierwoon/cesterqwen" model = AutoModelForCausalLM.from_pretrained(model_name) tokenizer = Qwen2Tokenizer.from_pretrained(model_name) # Paste your own code inside code = """ void add() { int a,b,c; printf("\nEnter The Two values:"); scanf("%d%d",&a,&b); c=a+b; printf("Addition:%d",c); } """ prompt = f"""### Instruction: create cester test cases for this function: {code} ### Input: ### Response: """ inputs = tokenizer(prompt, return_tensors="pt").to("cpu") from transformers import TextStreamer text_streamer = TextStreamer(tokenizer) _ = model.generate(**inputs, streamer = text_streamer, max_new_tokens = 2048)
Training Details
Training Data
Training Data was created based on Data Structures and Algorithm (DSA) codes created using ChatGPT. It would also create corresponding Cester test cases. After testing and ensuring a good code coverage, the prompt and corresponding test cases were added to the dataset.
Training Procedure
- Prompt GPT for sample DSA C code
- Prompt GPT for Libcester unit test cases with 100% code coverage
- Test generated test cases for robustness and code coverage
- Downloads last month
- 52
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.