Skip to content

feat: provide access method with api for 7B:int8#1

Open
streetycat wants to merge 1 commit intosoulteary:mainfrom
streetycat:main
Open

feat: provide access method with api for 7B:int8#1
streetycat wants to merge 1 commit intosoulteary:mainfrom
streetycat:main

Conversation

@streetycat
Copy link

you can access it with follow:

1. ui: input http://$host/, you can get a webpage.
2. api: POST http://$host/generate, with `body`:
     class RepetitionPenalty(BaseModel):
         range: Optional[int] = 1024
         slope: Optional[float] = 0
         value: Optional[float] = 1.15

     class GenerateParam(BaseModel):
         prompts: Union[List[str], str]
         max_gen_len: Optional[int] = 1024
         temperature: Optional[float] = 0.8
         top_p: Optional[float] = 0.95
         repetition_penalty: Optional[RepetitionPenalty] = RepetitionPenalty()

    you can get a json:
        {
              error: int,
              msg: "error messages",
              results: {results from llama}
        }

… with follow:

    1. ui: input http://$host/, you can get a webpage.
    2. api: POST http://$host/generate, with `body`:
         class RepetitionPenalty(BaseModel):
             range: Optional[int] = 1024
             slope: Optional[float] = 0
             value: Optional[float] = 1.15

         class GenerateParam(BaseModel):
             prompts: Union[List[str], str]
             max_gen_len: Optional[int] = 1024
             temperature: Optional[float] = 0.8
             top_p: Optional[float] = 0.95
             repetition_penalty: Optional[RepetitionPenalty] = RepetitionPenalty()

        you can get a json:
            {
                  error: int,
                  msg: "error messages",
                  results: {results from llama}
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant