Skip to content

Latest commit

 

History

History
95 lines (85 loc) · 19.5 KB

README.md

File metadata and controls

95 lines (85 loc) · 19.5 KB

Gemma

This folder is organized into several categories, each focusing on a speicific aspect of working with Gemma models:

Inference and serving

Notebook Name Description
[Gemma_1]Basics_with_HF.ipynb Load, run, finetune and deploy Gemma using Hugging Face.
[Gemma_1]Common_use_cases.ipynb Illustrate some common use cases for Gemma.
[Gemma_1]Inference with Flax/NNX Gemma 1 inference with Flax/NNX framework (linking to Flax documentation)
[Gemma_1]Inference_on_TPU.ipynb Basic inference of Gemma with JAX/Flax on TPU.
[Gemma_1]Using_with_Ollama.ipynb Run Gemma models using Ollama.
[Gemma_1]Using_with_OneTwo.ipynb Integrate Gemma with Google OneTwo.
[Gemma_1]data_parallel_inference_in_jax_tpu.ipynb Parallel inference of Gemma with JAX/Flax on TPU.
[Gemma_2]Constrained_generation.ipynb Constrained generation with Gemma models using LlamaCpp and Guidance.
[Gemma_2]Deploy_in_Vertex_AI.ipynb Deploy a Gemma model using Vertex AI.
[Gemma_2]Deploy_with_vLLM.ipynb Deploy a Gemma model using vLLM.
[Gemma_2]Game_Design_Brainstorming.ipynb Use Gemma to brainstorm ideas during game design using Keras.
[Gemma_2]Gradio_Chatbot.ipynb Building a Chatbot with Gemma and Gradio
[Gemma_2]Guess_the_word.ipynb Play a word guessing game with Gemma using Keras.
[Gemma_2]Keras_Quickstart.ipynb Gemma 2 pre-trained 9B model quickstart tutorial with Keras.
[Gemma_2]Keras_Quickstart_Chat.ipynb Gemma 2 instruction-tuned 9B model quickstart tutorial with Keras. Referenced in this blog.
[Gemma_2]Synthetic_data_generation.ipynb Synthetic data generation with Gemma 2
[Gemma_2]Using_Gemini_and_Gemma_with_RouteLLM.ipynb Route Gemma and Gemini models using RouteLLM.
[Gemma_2]Using_with_LLM_Comparator.ipynb Compare Gemma with another LLM using LLM Comparator.
[Gemma_2]Using_with_Langfun_and_LlamaCpp.ipynb Leverage Langfun to seamlessly integrate natural language with programming using Gemma 2 and LlamaCpp.
[Gemma_2]Using_with_Langfun_and_LlamaCpp_Python_Bindings.ipynb Leverage Langfun for smooth language-program interaction with Gemma 2 and llama-cpp-python.
[Gemma_2]Using_with_LlamaCpp.ipynb Run Gemma models using LlamaCpp.
[Gemma_2]Using_with_Llamafile.ipynb Run Gemma models using Llamafile.
[Gemma_2]Using_with_LocalGemma.ipynb Run Gemma models using Local Gemma.
[Gemma_2]Using_with_Mesop.ipynb Integrate Gemma with Google Mesop.
[Gemma_2]Using_with_Ollama_Python.ipynb Run Gemma models using Ollama Python library.
[Gemma_2]Using_with_SGLang.ipynb Run Gemma models using SGLang.
[Gemma_2]Using_with_Xinference.ipynb Run Gemma models using Xinference.
[Gemma_2]Using_with_mistral_rs.ipynb Run Gemma models using mistral.rs.
[Gemma_2]for_Japan_using_Transformers_and_PyTorch.ipynb Gemma 2 for Japan
[Gemma_2]on_Groq.ipynb Leverage the free Gemma 2 9B IT model hosted on Groq (super fast speed).

Prompting

Notebook Name Description
[Gemma_1]Advanced_Prompting_Techniques.ipynb Illustrate advanced prompting techniques with Gemma.
[Gemma_2]LangChain_chaining.ipynb Illustrate LangChain chaining with Gemma.
[Gemma_2]Prompt_chaining.ipynb Illustrate prompt chaining and iterative generation with Gemma.

RAG

Notebook Name Description
[Gemma_1]Minimal_RAG.ipynb Minimal example of building a RAG system with Gemma using Google UniSim and Hugging Face.
[Gemma_1]RAG_with_ChromaDB.ipynb Build a Retrieval Augmented Generation (RAG) system with Gemma using ChromaDB and Hugging Face.
[Gemma_2]RAG_LlamaIndex.ipynb RAG example with LlamaIndex using Gemma.
[Gemma_2]RAG_PDF_Search_in_multiple_documents_on_Colab.ipynb RAG PDF Search in multiple documents using Gemma 2 2B on Google Colab.
[Gemma_2]Using_with_Elasticsearch_and_LangChain.ipynb Example to demonstrate using Gemma with Elasticsearch, Ollama and LangChain.
[Gemma_2]Using_with_Firebase_Genkit_and_Ollama.ipynb Example to demonstrate using Gemma with Firebase Genkit and Ollama
[Gemma_2]Using_with_LangChain.ipynb Examples to demonstrate using Gemma with LangChain.

Finetuning

Notebook Name Description
[Gemma_1]Finetune_distributed.ipynb Chat with Gemma 7B and finetune it so that it generates responses in pirates' tone.
[Gemma_1]Finetune_with_LLaMA_Factory.ipynb Finetune Gemma using LLaMA-Factory.
[Gemma_1]Finetune_with_XTuner.ipynb Finetune Gemma using XTuner.
[Gemma_2]Custom_Vocabulary.ipynb Demonstrate how to use a custom vocabulary "<unused[0-98]>" tokens in Gemma.
[Gemma_2]Finetune_with_Axolotl.ipynb Finetune Gemma using Axolotl.
[Gemma_2]Finetune_with_CALM.ipynb Finetune Gemma using CALM.
[Gemma_2]Finetune_with_Function_Calling.ipynb Finetuning Gemma for Function Calling using PyTorch/XLA.
[Gemma_2]Finetune_with_JORA.ipynb Finetune Gemma using JORA.
[Gemma_2]Finetune_with_LitGPT.ipynb Finetune Gemma using LitGPT.
[Gemma_2]Finetune_with_Torch_XLA.ipynb Finetune Gemma using PyTorch/XLA.
[Gemma_2]Finetune_with_Unsloth.ipynb Finetune Gemma using Unsloth.
[Gemma_2]Translator_of_Old_Korean_Literature.ipynb Use Gemma to translate old Korean literature using Keras.

Alignment

Notebook Name Description
[Gemma_2]Aligning_DPO.ipynb Demonstrate how to align a Gemma model using DPO (Direct Preference Optimization) with Hugging Face TRL.

Evaluation

Notebook Name Description
[Gemma_2]evaluation.ipynb Demonstrate how to use Eleuther AI's LM evaluation harness to perform model evaluation on Gemma.

Agentic AI

Notebook Name Description
[Gemma_2]Agentic_AI.ipynb Demonstrate how to build an Agentic AI using Gemma 2.