support llama pro #2338 , add rslora

Former-commit-id: 40d659b7f30dd5a004703c176ec1f22dc864e505
This commit is contained in:
hiyouga
2024-02-15 02:27:36 +08:00
parent b403f8d8a8
commit 596b6828cb
24 changed files with 438 additions and 203 deletions

View File

@@ -1,13 +1,10 @@
import json
import os
from typing import Sequence
from openai import OpenAI
from transformers.utils.versions import require_version
os.environ["OPENAI_BASE_URL"] = "http://192.168.0.1:8000/v1"
os.environ["OPENAI_API_KEY"] = "0"
require_version("openai>=1.5.0", "To fix: pip install openai>=1.5.0")
@@ -24,7 +21,10 @@ tool_map = {"calculate_gpa": calculate_gpa}
if __name__ == "__main__":
client = OpenAI()
client = OpenAI(
api_key="0",
base_url="http://localhost:8000/v1",
)
tools = [
{
"type": "function",