from transformers import AutoTokenizer
from transformers import pipeline
import torch
tokenizer = AutoTokenizer.from_pretrained("damerajee/codellama2-finetuned-alpaca-18k-fin")
pipe = pipeline(
"text-generation",
model="damerajee/codellama2-finetuned-alpaca-18k-fin",
torch_dtype=torch.float16,
device_map="auto",
)
text = "write a function that takes in print out each individual characters in a string"
sequences = pipe(
text,
do_sample=True,
temperature=0.1,
top_p=0.7,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
max_length=70,
)
for seq in sequences:
print(f"Result: {seq['generated_text']}")
Training and evaluation data
Step
Training Loss
10
0.792200
20
0.416100
30
0.348600
40
0.323200
50
0.316300
60
0.317500
70
0.333600
80
0.329500
90
0.333400
100
0.309900
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
learning_rate: 0.0002
train_batch_size: 8
eval_batch_size: 8
seed: 42
gradient_accumulation_steps: 4
total_train_batch_size: 32
optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
lr_scheduler_type: cosine
training_steps: 100
mixed_precision_training: Native AMP
Training results
Framework versions
Transformers 4.36.0.dev0
Pytorch 2.0.0
Datasets 2.1.0
Tokenizers 0.15.0
Runs of damerajee codellama2-finetuned-alpaca-18k-fin on huggingface.co
28
Total runs
2
24-hour runs
1
3-day runs
6
7-day runs
18
30-day runs
More Information About codellama2-finetuned-alpaca-18k-fin huggingface.co Model
More codellama2-finetuned-alpaca-18k-fin license Visit here:
codellama2-finetuned-alpaca-18k-fin huggingface.co is an AI model on huggingface.co that provides codellama2-finetuned-alpaca-18k-fin's model effect (), which can be used instantly with this damerajee codellama2-finetuned-alpaca-18k-fin model. huggingface.co supports a free trial of the codellama2-finetuned-alpaca-18k-fin model, and also provides paid use of the codellama2-finetuned-alpaca-18k-fin. Support call codellama2-finetuned-alpaca-18k-fin model through api, including Node.js, Python, http.
codellama2-finetuned-alpaca-18k-fin huggingface.co is an online trial and call api platform, which integrates codellama2-finetuned-alpaca-18k-fin's modeling effects, including api services, and provides a free online trial of codellama2-finetuned-alpaca-18k-fin, you can try codellama2-finetuned-alpaca-18k-fin online for free by clicking the link below.
damerajee codellama2-finetuned-alpaca-18k-fin online free url in huggingface.co:
codellama2-finetuned-alpaca-18k-fin is an open source model from GitHub that offers a free installation service, and any user can find codellama2-finetuned-alpaca-18k-fin on GitHub to install. At the same time, huggingface.co provides the effect of codellama2-finetuned-alpaca-18k-fin install, users can directly use codellama2-finetuned-alpaca-18k-fin installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
codellama2-finetuned-alpaca-18k-fin install url in huggingface.co: