introvoyz041 commited on
Commit
6f6c459
·
verified ·
1 Parent(s): e8b0af9

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +50 -0
README.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gemma
3
+ library_name: transformers
4
+ tags:
5
+ - mlx
6
+ - mlx
7
+ - mlx-my-repo
8
+ extra_gated_heading: Access CodeGemma on Hugging Face
9
+ extra_gated_prompt: To access CodeGemma on Hugging Face, you’re required to review
10
+ and agree to Google’s usage license. To do this, please ensure you’re logged-in
11
+ to Hugging Face and click below. Requests are processed immediately.
12
+ extra_gated_button_content: Acknowledge license
13
+ pipeline_tag: text-generation
14
+ widget:
15
+ - text: '<start_of_turn>user Write a Python function to calculate the nth fibonacci
16
+ number.<end_of_turn> <start_of_turn>model
17
+
18
+ '
19
+ inference:
20
+ parameters:
21
+ max_new_tokens: 200
22
+ license_link: https://ai.google.dev/gemma/terms
23
+ base_model: mlx-community/codegemma-7b-it-8bit
24
+ ---
25
+
26
+ # introvoyz041/codegemma-7b-it-8bit-mlx-4Bit
27
+
28
+ The Model [introvoyz041/codegemma-7b-it-8bit-mlx-4Bit](https://huggingface.co/introvoyz041/codegemma-7b-it-8bit-mlx-4Bit) was converted to MLX format from [mlx-community/codegemma-7b-it-8bit](https://huggingface.co/mlx-community/codegemma-7b-it-8bit) using mlx-lm version **0.28.3**.
29
+
30
+ ## Use with mlx
31
+
32
+ ```bash
33
+ pip install mlx-lm
34
+ ```
35
+
36
+ ```python
37
+ from mlx_lm import load, generate
38
+
39
+ model, tokenizer = load("introvoyz041/codegemma-7b-it-8bit-mlx-4Bit")
40
+
41
+ prompt="hello"
42
+
43
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
44
+ messages = [{"role": "user", "content": prompt}]
45
+ prompt = tokenizer.apply_chat_template(
46
+ messages, tokenize=False, add_generation_prompt=True
47
+ )
48
+
49
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
50
+ ```