Add Gemma
diff --git a/fastchat/conversation.py b/fastchat/conversation.py
index 95576536c4..7a6aebed8e 100644
--- a/fastchat/conversation.py
+++ b/fastchat/conversation.py
@@ -1579,6 +1579,19 @@ def get_conv_template(name: str) -> Conversation:
     )
 )
 
+# Gemma
+# reference: https://huggingface.co/google/gemma-7b-it?text=%3Cstart_of_turn%3Euser%0AHow+does+the+brain+work%3F%3Cend_of_turn%3E%0A%3Cstart_of_turn%3Emodel
+register_conv_template(
+    Conversation(
+        name="gemma",
+        system_message="<bos>",
+        roles=("<start_of_turn>user\n", "<start_of_turn>model\n"),
+        sep_style=SeparatorStyle.NO_COLON_SINGLE,
+        sep="<end_of_turn>\n",
+        stop_str="<end_of_turn>",
+    )
+)
+
 
 if __name__ == "__main__":
     from fastchat.conversation import get_conv_template
diff --git a/fastchat/model/model_adapter.py b/fastchat/model/model_adapter.py
index 6d17aea73e..d7162bd6d0 100644
--- a/fastchat/model/model_adapter.py
+++ b/fastchat/model/model_adapter.py
@@ -2258,6 +2258,16 @@ def get_default_conv_template(self, model_path: str) -> Conversation:
         return get_conv_template("yuan")
 
 
+class GemmaAdapter(BaseModelAdapter):
+    """The model adapter for Gemma"""
+
+    def match(self, model_path: str):
+        return "gemma" in model_path.lower()
+
+    def get_default_conv_template(self, model_path: str) -> Conversation:
+        return get_conv_template("gemma")
+
+
 # Note: the registration order matters.
 # The one registered earlier has a higher matching priority.
 register_model_adapter(PeftModelAdapter)
@@ -2347,6 +2357,7 @@ def get_default_conv_template(self, model_path: str) -> Conversation:
 register_model_adapter(SteerLMAdapter)
 register_model_adapter(LlavaAdapter)
 register_model_adapter(YuanAdapter)
+register_model_adapter(GemmaAdapter)
 
 # After all adapters, try the default base adapter.
 register_model_adapter(BaseModelAdapter)
diff --git a/fastchat/model/model_registry.py b/fastchat/model/model_registry.py
index 1673bfe3f7..a2d79ac0d5 100644
--- a/fastchat/model/model_registry.py
+++ b/fastchat/model/model_registry.py
@@ -656,3 +656,10 @@ def get_model_info(name: str) -> ModelInfo:
     "https://github.com/haotian-liu/LLaVA",
     "an open large language and vision assistant",
 )
+
+register_model_info(
+    ["gemma-7b-it", "gemma-2b-it"],
+    "Gemma",
+    "https://blog.google/technology/developers/gemma-open-models/",
+    "Gemma by Google",
+)

## Why are these changes needed?

Adds the Gemma chat template for running the new Google Gemma models.

## Checks

- [ ] I've run `format.sh` to lint the changes in this PR.
- [ ] I've included any doc changes needed.
- [ ] I've made sure the relevant tests are passing (if applicable).
