CodeTF icon indicating copy to clipboard operation
CodeTF copied to clipboard

The example code was not working

Open u9wangcl opened this issue 1 year ago • 2 comments

image

u9wangcl avatar Jun 03 '23 07:06 u9wangcl

I agree with the previous comment that the example code doesn't seem to be working. I tried running it myself and encountered the same issue. It would be helpful if we could get some guidance on how to fix this problem or if there's an updated version of the code available. Thank you for bringing this to our attention.

luongdolong avatar Jun 06 '23 08:06 luongdolong

can try you with another model?

from codetf.models import load_model_pipeline

code_generation_model = load_model_pipeline(model_name="codet5", task="pretrained",
            model_type="plus-770M-python", is_eval=True,
            load_in_8bit=True, load_in_4bit=False, weight_sharding=False)
            
result = code_generation_model.predict(["def print_hello_world():"])
print(result)

The plus-220M version of CodeT5+ may not working well.

bdqnghi avatar Jun 06 '23 08:06 bdqnghi