Instructions to use hisham1404/llama3.1-python-coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use hisham1404/llama3.1-python-coder with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf hisham1404/llama3.1-python-coder:Q8_0 # Run inference directly in the terminal: llama cli -hf hisham1404/llama3.1-python-coder:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf hisham1404/llama3.1-python-coder:Q8_0 # Run inference directly in the terminal: llama cli -hf hisham1404/llama3.1-python-coder:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf hisham1404/llama3.1-python-coder:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf hisham1404/llama3.1-python-coder:Q8_0
Use Docker
docker model run hf.co/hisham1404/llama3.1-python-coder:Q8_0
- Llama new
- LM Studio
- Jan
- Ollama
How to use hisham1404/llama3.1-python-coder with Ollama:
ollama run hf.co/hisham1404/llama3.1-python-coder:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use hisham1404/llama3.1-python-coder with Docker Model Runner:
docker model run hf.co/hisham1404/llama3.1-python-coder:Q8_0
- Lemonade
How to use hisham1404/llama3.1-python-coder with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull hisham1404/llama3.1-python-coder:Q8_0
Run and chat with the model
lemonade run user.llama3.1-python-coder-Q8_0
List all available models
lemonade list
- Atomic Chat
|
Download README.md from hisham1404/llama3.1-python-coder: direct link, hf CLI and curl.
- Browser
- Download file 3.82 kB
-
https://huggingface.co/hisham1404/llama3.1-python-coder/resolve/refs%2Fpr%2F1/README.md
- Command line
-
hf download hf://hisham1404/llama3.1-python-coder@refs/pr/1/README.md
-
curl -L -o README.md https://huggingface.co/hisham1404/llama3.1-python-coder/resolve/refs%2Fpr%2F1/README.md
3.82 kB
| --- | |
| 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 | |
| ```python | |
| 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:** | |
| ```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! |