mirror of
https://www.modelscope.cn/LLM-Research/gemma-3-27b-it.git
synced 2026-04-02 12:42:52 +08:00
Update README.md (#35)
- Update README.md (617c1010a31f4c093f15af88aae3c433c9741700) Co-authored-by: Patrick Loeber <patloeber@users.noreply.huggingface.co>
This commit is contained in:
@ -60,10 +60,10 @@ for everyone.
|
|||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
Below there are some code snippets on how to get quickly started with running the model. First, install the Transformers library with the version made for Gemma 3:
|
Below there are some code snippets on how to get quickly started with running the model. First, install the Transformers library. Gemma 3 is supported starting from transformers 4.50.0.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ pip install git+https://github.com/huggingface/transformers@v4.49.0-Gemma-3
|
$ pip install -U transformers
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, copy the snippet from the section that is relevant for your use case.
|
Then, copy the snippet from the section that is relevant for your use case.
|
||||||
@ -102,7 +102,7 @@ messages = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
output = pipe(text=messages, max_new_tokens=200)
|
output = pipe(text=messages, max_new_tokens=200)
|
||||||
print(output[0][0]["generated_text"][-1]["content"])
|
print(output[0]["generated_text"][-1]["content"])
|
||||||
# Okay, let's take a look!
|
# Okay, let's take a look!
|
||||||
# Based on the image, the animal on the candy is a **turtle**.
|
# Based on the image, the animal on the candy is a **turtle**.
|
||||||
# You can see the shell shape and the head and legs.
|
# You can see the shell shape and the head and legs.
|
||||||
|
|||||||
Reference in New Issue
Block a user