huseyincavus commited on
Commit
3800514
·
verified ·
1 Parent(s): dc30403

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +43 -0
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: google/gemma-3-270m-it
3
+ license: gemma
4
+ tags:
5
+ - gemma3
6
+ - gemma
7
+ - google
8
+ - mlx
9
+ - mlx-my-repo
10
+ pipeline_tag: text-generation
11
+ library_name: transformers
12
+ extra_gated_heading: Access Gemma on Hugging Face
13
+ extra_gated_prompt: To access Gemma on Hugging Face, you’re required to review and
14
+ agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging
15
+ Face and click below. Requests are processed immediately.
16
+ extra_gated_button_content: Acknowledge license
17
+ ---
18
+
19
+ # huseyincavus/gemma-3-270m-it-mlx-2Bit
20
+
21
+ The Model [huseyincavus/gemma-3-270m-it-mlx-2Bit](https://huggingface.co/huseyincavus/gemma-3-270m-it-mlx-2Bit) was converted to MLX format from [google/gemma-3-270m-it](https://huggingface.co/google/gemma-3-270m-it) using mlx-lm version **0.26.3**.
22
+
23
+ ## Use with mlx
24
+
25
+ ```bash
26
+ pip install mlx-lm
27
+ ```
28
+
29
+ ```python
30
+ from mlx_lm import load, generate
31
+
32
+ model, tokenizer = load("huseyincavus/gemma-3-270m-it-mlx-2Bit")
33
+
34
+ prompt="hello"
35
+
36
+ if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
37
+ messages = [{"role": "user", "content": prompt}]
38
+ prompt = tokenizer.apply_chat_template(
39
+ messages, tokenize=False, add_generation_prompt=True
40
+ )
41
+
42
+ response = generate(model, tokenizer, prompt=prompt, verbose=True)
43
+ ```