1. 29 Oct, 2024 1 commit
    • xuxzh1's avatar
      last · efd602c8
      xuxzh1 authored
      efd602c8
  2. 15 Feb, 2024 1 commit
    • drbh's avatar
      Outlines guided generation (#1539) · cef0553d
      drbh authored
      This WIP PR starts to add grammar support via outlines, currently this
      PR supports very simple regex grammars and does not optimize for
      precompiling or caching grammar fsm's.
      
      todo:
      - [X] add simple outlines guidance to `NextTokenChooser`
      - [X] update protos for grammar
      - [X] update generation params API
      - [X] constrain simple grammar
      - [ ] support parsing more complex grammar into fsm
      - [ ] support all outline support grammar types
      - [ ] explore optimizations to avoid recompiling grammars
      
      guided request
      ```bash
      curl -s 'http://localhost:3000/generate' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "inputs": "make an email for david: \n",
          "parameters": {
              "max_new_tokens": 6,
              "grammar": "[\\w-]+@([\\w-]+\\.)+[\\w-]+"
          }
      }' | jq
      ```
      response
      ```json
      {
        "generated_text": "david@example.com"
      }
      ```
      
      unguided request
      ```bash
      curl -s 'http://localhost:3000/generate' \
      --header 'Content-Type: application/json' \
      --data '{
          "inputs": "make an email for david: \n",
          "parameters": {
              "max_new_tokens": 6
          }
      }' | jq
      ```
      response
      ```json
      {
        "generated_text": "    email = 'david"
      }
      ```
      cef0553d
  3. 11 Dec, 2023 1 commit
  4. 24 May, 2023 1 commit
  5. 10 May, 2023 1 commit
  6. 26 Apr, 2023 1 commit
  7. 21 Apr, 2023 1 commit
  8. 13 Feb, 2023 1 commit
  9. 03 Feb, 2023 1 commit
  10. 31 Jan, 2023 3 commits
  11. 15 Dec, 2022 1 commit
  12. 12 Dec, 2022 1 commit
  13. 20 Oct, 2022 1 commit
  14. 17 Oct, 2022 1 commit
  15. 11 Oct, 2022 1 commit
  16. 08 Oct, 2022 1 commit