YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

datasets:

  • flytech/python-codes-25k language:
  • en base_model:
  • meta-llama/Llama-3.1-8B

Model Card for LLaMA 3.1 8B Model (Finetuned using Unsloth)

Model Summary

This model is a finetuned version of LLaMA 3.1 8B, specifically adapted using the Unsloth dataset for enhanced performance on code generation tasks. The model excels in generating Python code and providing intelligent suggestions for developers. It has been trained to improve predictive accuracy and usability in AI-driven coding assistants.

Model Details

Model Description

This model is finetuned from LLaMA 3.1 8B, focusing on improving performance for code-related tasks. Using the Unsloth dataset, it has been trained to offer high-quality completions and optimize development workflows for Python programming.

  • Developed by: Hisham
  • Model type: Transformer-based Language Model (LLaMA 3.1 variant)
  • Language(s) (NLP): Primarily English, Python-specific vocabulary
  • Finetuned from model: LLaMA 3.1 8B

Uses

Direct Use

This model can be used directly to assist in code completion, suggestions, and problem-solving for Python-based projects. It provides smart completions based on the context of code.

Downstream Use

The model can be fine-tuned further for specific software development tasks, including automation, refactoring, and debugging assistance.

Out-of-Scope Use

The model is not suitable for non-code-related text generation or for use in domains requiring high factual precision, such as medical or legal documentation.

Bias, Risks, and Limitations

Due to the nature of language models, this model may generate incorrect or incomplete code. There are also risks of biases in the code patterns it generates, potentially reproducing biased or unsafe coding practices present in the training data.

Recommendations

Users (both direct and downstream) should be aware of the risks, biases, and limitations of the model. It is recommended to thoroughly test the generated code in critical systems and ensure compliance with best coding practices.

How to Get Started with the Model

from transformers import AutoModelForCausalLM, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.1-8B")
model = AutoModelForCausalLM.from_pretrained("hisham1404/llama3.1-python-coder")

# Example usage
inputs = tokenizer("def my_function():", return_tensors="pt")
outputs = model.generate(inputs["input_ids"], max_length=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Training Details

The model was finetuned using Unsloth framework.

Summary

The finetuned model demonstrates strong performance in generating usable Python code but may occasionally require human oversight to ensure code correctness and adherence to best practices.

Model Examination

No specific interpretability work has been conducted on this model.

Technical Specifications

Model Architecture and Objective

The model is based on the LLaMA 3.1 8B architecture, which employs multi-head self-attention layers for natural language processing tasks. This variant has been optimized for code generation tasks.

Software

  • Frameworks: PyTorch 2.0
  • Libraries: Hugging Face Transformers

Citation [optional]

BibTeX:

@misc{hisham2024llama3.1,
  author = {Hisham},
  title = {Finetuning LLaMA 3.1 8B with Unsloth for Python Code Generation},
  year = {2024},
}

APA:

Hisham. (2024). Finetuning LLaMA 3.1 8B with Unsloth for Python Code Generation.

More Information

For more details on fine-tuning, check out the LLaMA 3.1 model card and Hugging Face documentation.

Model Card Authors

Model card authored by Hisham.

Let me know if you'd like any changes or additional details!

Downloads last month
149
GGUF
Model size
8.03B params
Architecture
llama
Hardware compatibility
Log In to view the estimation

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support