anakin87 commited on
Commit
ae87dd4
·
1 Parent(s): ef807be

improve readme

Browse files
Files changed (1) hide show
  1. README.md +41 -2
README.md CHANGED
@@ -2,11 +2,50 @@
2
  license: other
3
  license_name: gemma-terms-of-use
4
  license_link: https://ai.google.dev/gemma/terms
5
- base_model: google/gemma-2b
6
  tags:
7
  - orpo
8
  datasets:
9
  - alvarobartt/dpo-mix-7k-simplified
10
  language:
11
  - en
12
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: other
3
  license_name: gemma-terms-of-use
4
  license_link: https://ai.google.dev/gemma/terms
5
+ base_model: anakin87/gemma-2b-orpo
6
  tags:
7
  - orpo
8
  datasets:
9
  - alvarobartt/dpo-mix-7k-simplified
10
  language:
11
  - en
12
+ ---
13
+
14
+ <img src="https://huggingface.co/anakin87/gemma-2b-orpo/resolve/main/assets/gemma-2b-orpo.png" width="450"></img>
15
+ # gemma-2b-orpo-GGUF
16
+
17
+ This is a GGUF quantized version of the [`gemma-2b-orpo` model](https://huggingface.co/anakin87/gemma-2b-orpo/):
18
+ an ORPO fine-tune of google/gemma-2b.
19
+
20
+ You can find more information, including evaluation and training/usage notebook in the [`gemma-2b-orpo` model card](https://huggingface.co/anakin87/gemma-2b-orpo/)
21
+
22
+ ## 🎮 Model in action
23
+ The model can run with all the libraries which are part of the Llama.cpp ecosystem.
24
+
25
+ If you need to manually apply the prompt template, take a look at the [tokenizer_config.json of the original model](https://huggingface.co/anakin87/gemma-2b-orpo/blob/main/tokenizer_config.json).
26
+
27
+ Here a simple example with **Llama.cpp python**:
28
+ ```python
29
+ ! pip install llama-cpp-python
30
+
31
+ from llama_cpp import Llama
32
+
33
+ llm = Llama.from_pretrained(
34
+ repo_id="anakin87/gemma-2b-orpo-GGUF",
35
+ filename="gemma-2b-orpo.Q5_K_M.gguf",
36
+ verbose=True # for a known bug, verbose must be True
37
+ )
38
+
39
+ # text generation - prompt template applied manually
40
+ llm("<bos><|im_start|> user\nName the planets in the solar system<|im_end|>\n<|im_start|>assistant\n", max_tokens=75)
41
+
42
+ # chat completion - prompt template automatically applied
43
+ llm.create_chat_completion(
44
+ messages = [
45
+ {
46
+ "role": "user",
47
+ "content": "Please list some places to visit in Italy"
48
+ }
49
+ ]
50
+ )
51
+ ```