Edit model card

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

    1. Prompt GPT for sample DSA C code
    2. Prompt GPT for Libcester unit test cases with 100% code coverage
    3. Test generated test cases for robustness and code coverage
Downloads last month
36
Safetensors
Model size
1.54B params
Tensor type
F32
·
Inference Examples
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.

Model tree for xavierwoon/cesterqwen

Base model

Qwen/Qwen2.5-1.5B
Finetuned
(37)
this model

Dataset used to train xavierwoon/cesterqwen