Skip to content
This repository was archived by the owner on Jun 12, 2024. It is now read-only.

Commit 3d60d53

Browse files
authored
doc: add google open llms
1 parent 8ae4f28 commit 3d60d53

File tree

1 file changed

+17
-48
lines changed

1 file changed

+17
-48
lines changed

README.md

Lines changed: 17 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -24,44 +24,6 @@ Collaborated competently with [Antonio Cheong](https://github.com/acheong08).
2424

2525
<br>
2626

27-
### Large Language Models of Google
28-
29-
| Model | Type | Access | Details | Links |
30-
|:--------------:|:--------------:|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------|
31-
| **Gemini** | 🔐<br>Proprietary | API only *(This repository contains unofficial API)* | Gemini is a proprietary multimodal AI developed by Google DeepMind. It includes models like Gemini Pro and Gemini Pro Vision. | [Paper](https://arxiv.org/abs/2312.11805), [Website](https://deepmind.google/technologies/gemini/#introduction), [API](https://aistudio.google.com/), [API Docs](https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemini) |
32-
| **Gemma** | 🤝<br>Open Source | Downloadable weights for on-premises use | Gemma models are open-source, text-to-text language models with downloadable weights. Perfect for use cases like question answering and summarization. | [Paprer](https://arxiv.org/abs/2403.08295), [Website](https://ai.google.dev/gemma/docs?hl=ko), [Model Card](https://huggingface.co/google/gemma-7b) |
33-
| **Code Gemma** | 🤝<br>Open Source | Downloadable weights for on-premises use | Code Gemma models are designed specifically for coding tasks and are also open-source, providing flexibility for developers in handling code generation tasks. | [Paper](https://storage.googleapis.com/deepmind-media/gemma/codegemma_report.pdf?utm_source=substack&utm_medium=email), [Post](https://huggingface.co/blog/codegemma), [Hugging Face Collection](https://huggingface.co/collections/google/codegemma-release-66152ac7b683e2667abdee11), [Model Card](https://huggingface.co/google/codegemma-7b-it) |
34-
35-
<details><summary>Code Examples of Gemma and GemmaCode </summary>
36-
37-
#### Gemma
38-
```python
39-
from transformers import AutoTokenizer, AutoModelForCausalLM
40-
41-
tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b")
42-
model = AutoModelForCausalLM.from_pretrained("google/gemma-7b")
43-
input_text = "Write me a poem about Machine Learning."
44-
input_ids = tokenizer(input_text, return_tensors="pt")
45-
outputs = model.generate(**input_ids)
46-
print(tokenizer.decode(outputs[0]))
47-
```
48-
49-
#### Code Gemma
50-
```python
51-
from transformers import GemmaTokenizer, AutoModelForCausalLM
52-
53-
tokenizer = GemmaTokenizer.from_pretrained("google/codegemma-7b-it")
54-
model = AutoModelForCausalLM.from_pretrained("google/codegemma-7b-it")
55-
input_text = "Write me a Python function to calculate the nth fibonacci number."
56-
input_ids = tokenizer(input_text, return_tensors="pt")
57-
outputs = model.generate(**input_ids)
58-
print(tokenizer.decode(outputs[0]))
59-
```
60-
61-
</details>
62-
63-
64-
6527
<br>
6628

6729

@@ -74,7 +36,7 @@ print(tokenizer.decode(outputs[0]))
7436

7537

7638
- [ Gemini API ](#-gemini-api---)
77-
- [What is Gemini?🔐](#what-is-gemini)
39+
- [What is Gemini? 🔐](#what-is-gemini)
7840
- [Installation ✅](#installation-)
7941
- [Authentication ✅](#authentication)
8042
- [Quick Start ✅](#quick-start)
@@ -91,8 +53,9 @@ print(tokenizer.decode(outputs[0]))
9153
- [# 10. Changing the Selected Response from 0 to *n*](#-10-changing-the-selected-response-from-0-to-n)
9254
- [# 11. Generate custom content](#-11-generate-custom-content)
9355
- [Further](#further)
94-
- [Open-source LLM, Gemma🤝](#open-source-llm-gemma)
95-
- [Open-source LLM, Code Gemma🤝](#open-source-llm-code-gemma)
56+
- [Google Open-source LLMs](#google-open-source-llms)
57+
- [Open-source LLM, Gemma 🤝](#open-source-llm-gemma)
58+
- [Open-source LLM, Code Gemma 🤝](#open-source-llm-code-gemma)
9659
- [Utilize free open-source LLM API through Open Router ✅](#utilize-free-open-source-llm-api-through-open-router)
9760

9861

@@ -607,13 +570,21 @@ If you want to develop your own simple code, you can start from [this simple cod
607570

608571
<br>
609572

573+
## Google Open-source LLMs
574+
If you have sufficient GPU resources, you can download weights directly instead of using the Gemini API to generate content. Consider Gemma and Code Gemma, an open-source models **available for on-premises use**.
575+
| Model | Type | Access | Details |
576+
|:---------------:|:-------------------:|:-------------------------------------:|-------------------------------------------------------------------------------------------------------------------|
577+
| [Gemini](https://huggingface.co/google/gemma-7b) | 🔐<br>Proprietary | API only | A proprietary multimodal AI by Google DeepMind, Gemini includes advanced models like Gemini Pro and Gemini Pro Vision. Access to Gemini is limited to API use through an [official API](https://aistudio.google.com/) and [unofficial API](https://github.com/dsdanielpark/Gemini-API), and further insights can be gathered from the [paper](https://arxiv.org/abs/2312.11805) and the [official website](https://deepmind.google/technologies/gemini/#introduction) |
578+
| [Gemma](https://huggingface.co/google/gemma-7b) | 🤝<br>Open Source | Downloadable | An open-source, text-to-text language model, Gemma is ideal for tasks like question answering and summarization. The model's weights are downloadable for on-premises use, and details are available in the [paper](https://arxiv.org/abs/2403.08295), on the [website](https://ai.google.dev/gemma/docs) |
579+
| [Code Gemma](https://huggingface.co/google/codegemma-7b-it) | 🤝<br>Open Source | Downloadable | Specifically designed for coding tasks, Code Gemma is another open-source model from Google. It provides downloadable weights to aid developers with code generation and related tasks. More information can be found in the [paper](https://storage.googleapis.com/deepmind-media/gemma/codegemma_report.pdf?utm_source=substack&utm_medium=email), [blog post](https://huggingface.co/blog/codegemma), and the [Hugging Face collection](https://huggingface.co/collections/google/codegemma-release-66152ac7b683e2667abdee11) |
580+
581+
582+
### Open-source LLM, [Gemma](https://huggingface.co/google/gemma-7b)
610583

611-
## Open-source LLM, [Gemma](https://huggingface.co/google/gemma-7b)
612-
If you have sufficient GPU resources, you can download weights directly instead of using the Gemini API to generate content. Consider Gemma, an open-source model **available for on-premises use**.
613584

614585
[Gemma](https://huggingface.co/google/gemma-7b) models are Google's lightweight, advanced text-to-text, decoder-only language models, derived from Gemini research. Available in English, they offer open weights and variants, ideal for tasks like question answering and summarization. Their small size enables deployment in resource-limited settings, broadening access to cutting-edge AI. For more infomation, visit [Gemma-7b](https://huggingface.co/google/gemma-7b) model card.
615586

616-
### How to use Gemma
587+
#### How to use Gemma
617588
```python
618589
from transformers import AutoTokenizer, AutoModelForCausalLM
619590

@@ -627,13 +598,11 @@ outputs = model.generate(**input_ids)
627598
print(tokenizer.decode(outputs[0]))
628599
```
629600

630-
<br>
631-
632-
## Open-source LLM, [Code Gemma](https://huggingface.co/collections/google/codegemma-release-66152ac7b683e2667abdee11)
601+
### Open-source LLM, [Code Gemma](https://huggingface.co/collections/google/codegemma-release-66152ac7b683e2667abdee11)
633602

634603
[CodeGemma](https://huggingface.co/blog/codegemma), which is an official release from Google for code LLMs, was released on April 9, 2024. It provides three models specifically designed for generating and interacting with code. You can explore the [Code Gemma models](https://huggingface.co/collections/google/codegemma-release-66152ac7b683e2667abdee11) and view the [model card](https://huggingface.co/google/codegemma-7b-it) for more details.
635604

636-
### How to use Code Gemma
605+
#### How to use Code Gemma
637606
```python
638607
from transformers import GemmaTokenizer, AutoModelForCausalLM
639608

0 commit comments

Comments
 (0)