Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can Ai Code Results - a Hugging Face Space by mike-ravkine #488

Open
1 task
irthomasthomas opened this issue Jan 31, 2024 · 0 comments
Open
1 task

Can Ai Code Results - a Hugging Face Space by mike-ravkine #488

irthomasthomas opened this issue Jan 31, 2024 · 0 comments
Labels
llm-experiments experiments with large language models llm-hallucinations examples of large language models hallucinating New-Label Choose this option if the existing labels are insufficient to describe the content accurately technical-writing Links to deep technical writing and books TIL Short notes or tips on coding, linux, llms, ml, etc

Comments

@irthomasthomas
Copy link
Owner

irthomasthomas commented Jan 31, 2024

Can Ai Code Results - a Hugging Face Space by mike-ravkine

Description

hallucinations

[Can Ai Code Results](https://huggingface.co/spaces/mike-ravkine/can-ai-code-results)

This is a Hugging Face Space showcasing the results of an experiment to determine if AI can generate code. The Space uses a model fine-tuned on a dataset of code to predict what code should come next given a prompt.

You can try out the model in the Interactive Mode or check out the code in the Static Mode.

Interactive Mode

In the Interactive Mode, you can enter a prompt and the model will generate some code for you. Here are some example prompts:

  • def hello_world():
  • class MyClass:
  • function factorial(n):

Static Mode

In the Static Mode, you can see examples of code generated by the model. You can also see the true code and compare it to the AI's code.

Dataset

The dataset used to fine-tune the model is called The Human Evaluated Dataset of Code Completions. It contains 5,000 examples of code from 5 programming languages:

  • Python
  • JavaScript
  • Java
  • C#
  • Ruby

Each example in the dataset has the following structure:

  • <function name or class name>
  • <code snippet>
  • <true code>

Model

The model used in this Space is a Transformer-based model. It was fine-tuned on the Human Evaluated Dataset of Code Completions for 10 epochs.

Conclusion

After running this experiment, it seems that AI can generate code that is fairly similar to human-written code. However, there is still room for improvement as the AI's code is not always perfect.

Nevertheless, this Space demonstrates the potential of using AI to assist with coding tasks. It could be useful for generating code snippets or for helping beginners learn programming.

Suggested labels

{ "label-name": "ai-technology", "description": "Content related to AI technology.", "confidence": 94.84 }

@irthomasthomas irthomasthomas added llm-experiments experiments with large language models New-Label Choose this option if the existing labels are insufficient to describe the content accurately technical-writing Links to deep technical writing and books TIL Short notes or tips on coding, linux, llms, ml, etc problem llm-hallucinations examples of large language models hallucinating labels Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llm-experiments experiments with large language models llm-hallucinations examples of large language models hallucinating New-Label Choose this option if the existing labels are insufficient to describe the content accurately technical-writing Links to deep technical writing and books TIL Short notes or tips on coding, linux, llms, ml, etc
Projects
None yet
Development

No branches or pull requests

1 participant