rabimba commited on
Commit
4f3630c
1 Parent(s): b5e0356

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +40 -0
README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - Gemma Sprint
5
+ - GDE
6
+ - Google Cloud Champions Innovator
7
+ - Google Cloud Research Innovator
8
+ creator: Rabimba
9
+ ---
10
+
11
+ # Gemma-rk-master1
12
+
13
+ The strength of this model is
14
+ - Coding
15
+ - Poetic
16
+ - DPO Trained
17
+
18
+ ## 💻 Usage
19
+
20
+ ```python
21
+ !pip install -qU transformers bitsandbytes accelerate
22
+
23
+ from transformers import AutoTokenizer
24
+ import transformers
25
+ import torch
26
+
27
+ model = "rabimba/Gemma-rk-master1"
28
+
29
+ tokenizer = AutoTokenizer.from_pretrained(model)
30
+ pipeline = transformers.pipeline(
31
+ "text-generation",
32
+ model=model,
33
+ model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
34
+ )
35
+
36
+ messages = [{"role": "user", "content": "Explain what a LLM is in less than 100 words."}]
37
+ prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
38
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
39
+ print(outputs[0]["generated_text"])
40
+ ```