Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emojis unsupported (vLLM integration) #116

Open
milesial opened this issue Jun 27, 2024 · 1 comment
Open

Emojis unsupported (vLLM integration) #116

milesial opened this issue Jun 27, 2024 · 1 comment

Comments

@milesial
Copy link

Hi, using version 0.10.3 and the llama3 tokenizer, with vLLM, I can't seem to constrain to generate emojis.

 curl --request POST \
  --url http://localhost:8000/v1/chat/completions \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "meta-llama/Meta-Llama-3-8B-Instruct",
  "messages": [
    {
      "content": "",
      "role": "user"
    }
  ],
  "guided_decoding_backend": "lm-format-enforcer",
  "guided_choice": ["🐈"],
  "temperature": 0.0,
  "top_p": 0.7,
  "max_tokens": 100,
  "stream": false
}'

[ERROR] Unknown LMFormatEnforcer Problem. Prefix: ''

Even though the tokenizer supports it

tok = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-8B")
tok.encode("🐈")
[128000, 9468, 238, 230]

It might be related to multi-tokens characters, outlines had to deal with similar issues: dottxt-ai/outlines#738

@noamgat
Copy link
Owner

noamgat commented Jun 27, 2024 via email

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

No branches or pull requests

2 participants