Downloads · 30 days
148
3% of all-time downloads
RichardErkhov/shahdishank_-_gemma-2b-it-finetune-python-codes-gguf
shahdishank_-_gemma-2b-it-finetune-python-codes-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
148
3% of all-time downloads
All-time downloads
5.5K
Public
Repo size
30.7 GB
Likes
1
Public
Click a slice to open those files.
.gguf35.6 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
gemma-2b-it-finetune-python-codes - GGUF
license: gemma datasets:
This model card corresponds to the 2B finetuned version of the Gemma-2b-it model. You can visit the model card of the 2B Gemma Instruct.
Author: Dishank Shah
GifPC-2b (Gemma-2b-it-finetuned-python-codes) LLM is trained on a dataset containing Python code snippets. This specialized training aimed to enhance Gemma-2b-it's understanding of Python syntax, semantics, and common programming patterns. With this finetuning, Gemma-2b-it is now proficient in not only comprehending Python code but also capable of assisting in debugging tasks. Users can leverage its trained knowledge to seek guidance on Python-related issues, understand code logic, and identify potential errors within their programs. This specialized Gemma-2b-it variant serves as a valuable tool for programmers seeking assistance and guidance in Python programming and debugging tasks.
Below we share some code snippets on how to get quickly started with running the model. First make sure to pip install -U transformers, then copy the snippet from the section that is relevant for your usecase.
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "shahdishank/gemma-2b-it-finetune-python-codes"
HUGGING_FACE_TOKEN = "YOUR_TOKEN"
tokenizer = AutoTokenizer.from_pretrained(model_name, token="HUGGING_FACE_TOKEN")
model = AutoModelForCausalLM.from_pretrained(model_name, token="HUGGING_FACE_TOKEN")
prompt_template = """\
user:\n{query} \n\n assistant:\n
"""
prompt = prompt_template.format(query="write a simple python function") # write your query here
input_ids = tokenizer(prompt, return_tensors="pt", add_special_tokens=True)
outputs = model.generate(**input_ids, max_new_tokens=2000, do_sample=True, pad_token_id=tokenizer.eos_token_id)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Data used for model training python-codes-25k.
These models were trained on a dataset of text data that includes a wide variety of python codes. Here are the key components:
This diverse data source is crucial for training a powerful language model that can handle a wide variety of different tasks.
This LLM can be used for: