Downloads · 30 days
21
16% of all-time downloads
SaikatM/Code-Gemma-v1
Code-Gemma-v1 is a text generation model from SaikatM. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of google/gemma-2b on an SaikatM/Code-Platypus dataset.
Downloads · 30 days
21
16% of all-time downloads
All-time downloads
130
Public
Parameters
2.5B
5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of google/gemma-2b on an SaikatM/Code-Platypus dataset.
Training code can be found here: https://github.com/Saikat-M/LLM-Finetuning
Dataset: https://huggingface.co/datasets/SaikatM/Code-Platypus
Source Dataset: https://huggingface.co/datasets/garage-bAInd/Open-Platypus
Used QLoRA from PEFT and used SFTTrainer.
From the Open-Platypus dataset filtering-out rows which has leetcode_ne in it's data_source column.
LoraConfig(
r=4,
lora_alpha=2,
target_modules=modules,
lora_dropout=0.05,
bias="none",
task_type="CAUSAL_LM"
)
TrainingArguments(
output_dir="gemma-2b-code-platypus",
num_train_epochs=1,
per_device_train_batch_size=4,
gradient_accumulation_steps=4,
gradient_checkpointing=True,
optim="paged_adamw_8bit",
logging_steps=1,
save_strategy="epoch",
bf16=False,
tf32=False,
learning_rate=2e-4,
max_steps= 100,
max_grad_norm=0.3,
warmup_ratio=0.03,
lr_scheduler_type="constant",
push_to_hub=False,
report_to="tensorboard",
)
SFTTrainer(
model=model,
train_dataset=train_data,
eval_dataset=test_data,
dataset_text_field="text",
peft_config=lora_config,
max_seq_length=512,
tokenizer=tokenizer,
args=training_arguments,
)
Took around 1 hour to train.
Write a fucntion to sort a list in python
Answer:
def sort_list(list):
return sorted(list)<eos>
Response: None
Write a function to count Consonants in a Given Word in Python
Response: None
Write a function to count the number of vowels in a given string in Python.
Example 1:
Input: s = "leetcodeisgreat"
Output: 5
Explanation: The vowels are 'e', 'i', 'a', 'o', and 'u'.
Example 2:
Input: s = "leetcodeisgreat"
Output: 0
Explanation: The vowels are 'e', 'i', 'a', 'o', and 'u'.
Constraints:
* 1 <= s.length <= 100
* s consists of lowercase English letters.
def countVowels(s):
count = 0
for c in s:
if c in 'aeiou':
count += 1
return count
<eos>
Response: None
Trained in Google Colab
T4 GPU Hardware accelerator.