Downloads Β· 30 days
0
drlee1/gemma2-9b-it-qdora-summary
gemma2-9b-it-qdora-summary is a machine learning model from drlee1. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This is the model card of a π€ transformers model that has been pushed on the Hub. This model card has been automatically generated.
Downloads Β· 30 days
0
Access
Public
Updated Oct 21, 2024
Repo size
258 MB
Likes
0
Public
Click a slice to open those files.
.safetensors220 MB Β· 85%
From the Hugging Face model README
This is the model card of a π€ transformers model that has been pushed on the Hub. This model card has been automatically generated.
from peft import PeftModel
from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "google/gemma-2-9b-it"
PEFT_MODEL_ID = "drlee1/gemma2-9b-it-qdora-summary"
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, device_map = 'auto', torch_dtype = torch.float16)
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = PeftModel.from_pretrained(model, PEFT_MODEL_ID, device_map = 'auto', torch_dtype = torch.float16)
pipe = pipeline("text-generation", model = model, tokenizer = tokenizer, max_new_tokens = 512)
doc = "..."
messages = [
{"role": "user", "content": "λ€μ κΈμ μμ½ν΄μ£ΌμΈμ:\n\n{}".format(doc)}
]
prompt = tokenizer.apply_chat_template(messages, tokenize = False, add_generation_prompt = True)
outputs = pipe(
prompt,
do_sample = True,
temperature = .2,
top_k = 50,
top_p = .95,
add_special_tokens = True
)
print(outputs[0]['generated_text'][len(prompt):])
# chat template
<bos><start_of_turn>user\nλ€μ κΈμ μμ½ν΄μ£ΌμΈμ:\n\n{data}<end_of_turn>\n<start_of_turn>model\n{label}
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
Use the code below to get started with the model.
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
| Step | Training Loss |
|---|---|
| 100 | 1.528100 |
| 200 | 1.409400 |
| 300 | 1.372800 |
| 400 | 1.325900 |
| 500 | 1.341600 |
[More Information Needed]
[More Information Needed]
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]