support stable-vicuna model
diff --git a/fastchat/conversation.py b/fastchat/conversation.py
index 7bd836a287..f00efbd6e3 100644
--- a/fastchat/conversation.py
+++ b/fastchat/conversation.py
@@ -1129,6 +1129,20 @@ def get_conv_template(name: str) -> Conversation:
     )
 )
 
+# Stable Vicuna default template
+# source: https://huggingface.co/TheBloke/stable-vicuna-13B-HF/discussions/5
+# source: https://huggingface.co/spaces/CarperAI/StableVicuna/blob/main/app.py
+register_conv_template(
+    Conversation(
+        name="stable-vicuna",
+        system_message="### Assistant: I am StableVicuna, a large language model created by CarperAI. I am here to chat!\n",
+        roles=("### Human", "### Assistant"),
+        sep_style=SeparatorStyle.ADD_COLON_TWO,
+        sep="\n",
+        sep2="\n\n",
+    )
+)
+
 register_conv_template(
     Conversation(
         name="vigogne_chat_v3",
diff --git a/fastchat/model/model_adapter.py b/fastchat/model/model_adapter.py
index b6812e7de8..d3647ead99 100644
--- a/fastchat/model/model_adapter.py
+++ b/fastchat/model/model_adapter.py
@@ -1784,6 +1784,22 @@ def get_default_conv_template(self, model_path: str) -> Conversation:
         return get_conv_template("llama-2")
 
 
+class StableVicunaAdapter(BaseModelAdapter):
+    """The model adapter for StableVicuna"""
+
+    def match(self, model_path: str):
+        return "stable-vicuna" in model_path.lower()
+
+    def load_model(self, model_path: str, from_pretrained_kwargs: dict):
+        model, tokenizer = super().load_model(model_path, from_pretrained_kwargs)
+        model.config.eos_token_id = tokenizer.eos_token_id
+        model.config.pad_token_id = tokenizer.pad_token_id
+        return model, tokenizer
+
+    def get_default_conv_template(self, model_path: str) -> Conversation:
+        return get_conv_template("stable-vicuna")
+
+
 class PhindCodeLlamaAdapter(CodeLlamaAdapter):
     """The model adapter for Phind-CodeLlama (e.g., Phind/Phind-CodeLlama-34B-v2)"""
 
@@ -1867,6 +1883,7 @@ def get_default_conv_template(self, model_path: str) -> Conversation:
 # Note: the registration order matters.
 # The one registered earlier has a higher matching priority.
 register_model_adapter(PeftModelAdapter)
+register_model_adapter(StableVicunaAdapter)
 register_model_adapter(VicunaAdapter)
 register_model_adapter(AiroborosAdapter)
 register_model_adapter(LongChatAdapter)
diff --git a/fastchat/model/model_registry.py b/fastchat/model/model_registry.py
index 840d91da46..5bef2996f5 100644
--- a/fastchat/model/model_registry.py
+++ b/fastchat/model/model_registry.py
@@ -348,6 +348,12 @@ def get_model_info(name: str) -> ModelInfo:
     "https://huggingface.co/bofenghuang/vigogne-2-7b-chat",
     "Vigogne-Chat is a French large language model (LLM) optimized for instruction-following and multi-turn dialogues, developed by Bofeng Huang",
 )
+register_model_info(
+    ["stable-vicuna-13B-HF"],
+    "stable-vicuna",
+    "https://huggingface.co/TheBloke/stable-vicuna-13B-HF",
+    "StableVicuna is a Vicuna model fine-tuned using RLHF via PPO on various conversational and instructional datasets.",
+)
 register_model_info(
     ["deluxe-chat-v1", "deluxe-chat-v1.1"],
     "DeluxeChat",

<!-- Thank you for your contribution! -->

<!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. -->

## Why are these changes needed?
Supports stable-vicuna model.

## Related issue number (if applicable)
Closes #829 

## Checks

- [x] 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).



---

I tried to add a new model by following the steps from the guide.
However, I think there are some ambiguities in my PR.

1. The original StableVicuna from HF (https://huggingface.co/spaces/CarperAI/StableVicuna) is paused. I am concerned about whether it is appropriate to use the quantized model from TheBloke (https://huggingface.co/TheBloke/stable-vicuna-13B-HF).
2. Regarding the conversation template format, I found the demo code at https://huggingface.co/spaces/CarperAI/StableVicuna/blob/main/app.py, but I'm unsure if I have applied it correctly.

If anyone reviews my code and provides the correct guidance, I will make the necessary fixes.
Thank you.
