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

garbled Chinese characters #605

Open
hsoftxl opened this issue Jan 13, 2025 · 4 comments
Open

garbled Chinese characters #605

hsoftxl opened this issue Jan 13, 2025 · 4 comments

Comments

@hsoftxl
Copy link

hsoftxl commented Jan 13, 2025

When using the LLama 3.3 70B model, the text printed in the terminal is normal, but the content returned by the interface shows garbled Chinese characters.

@AlexCheema
Copy link
Contributor

When using the LLama 3.3 70B model, the text printed in the terminal is normal, but the content returned by the interface shows garbled Chinese characters.

Hi, sorry to hear you're getting garbled output.

What devices are you running exo on?

@hsoftxl
Copy link
Author

hsoftxl commented Jan 14, 2025

@AlexCheema Mac studio M2 ultra ,
OS:Sequoia 15.2 (24C101)

@tenkeyless
Copy link

Same as Korean.

CleanShot 2025-01-14 at 21 47 46

The top is the terminal, and the bottom is the web interface.

The screen breaks in the web interface, and this also happens when used in other applications through the chatgpt API address.

The same applies when using many models such as phi-4, phi-3.5, Deepseek Coder v2 lite, Llama 3.2 3B, etc.

My specifications are m1 pro 32gb, Sequoia 15.2.

@tenkeyless
Copy link

I think it might be encoding problem.

When I run it with curl, exo response string encoded by utf-16.

curl http://localhost:52415/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
     "model": "phi-4",
     "messages": [{"role": "user", "content": "What is the meaning of exo?"}],
     "temperature": 0.7
   }'


{"id": "chatcmpl-dd237cf3-20ef-4860-976d-a333ad1b6913", "object": "chat.completion", "created": 1736855751, "model": "phi-4", "system_fingerprint": "exo_0.0.1", "choices": [{"index": 0, "message": {"role": "assistant", "content": "The prefix \"exo-\" comes from the Greek word \"ex\u014d,\" meaning \"outside\" or \"external.\" It is commonly used in various scientific and technical contexts to denote something that is outside, outside of, or beyond a particular boundary or system. Here are a few examples of its usage:\n\n1. **Exoplanet**: A planet that orbits a star outside the solar system.\n2. **Exoskeleton**: An external skeleton that supports and protects an animal's body, as opposed to an internal skeleton (endoskeleton).\n3. **Exothermic**: A chemical reaction that releases energy by light or heat.\n4. **Exosphere**: The outermost layer of a planet's atmosphere.\n\nIn each of these examples, \"exo-\" indicates something that is external or outside of a particular reference point."}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 15, "completion_tokens": 163, "total_tokens": 178}}%                                                
curl http://localhost:52415/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
     "model": "phi-4",
     "messages": [{"role": "user", "content": "너는 누구니?"}],
     "temperature": 0.7
   }'
{"id": "chatcmpl-30e4c3b9-a40b-484a-855b-8f71ebacc523", "object": "chat.completion", "created": 1736855772, "model": "phi-4", "system_fingerprint": "exo_0.0.1", "choices": [{"index": 0, "message": {"role": "assistant", "content": "\uc800\ub294 OpenAI\uac00 \uac1c\ubc1c\ud55c \uc5b8\uc5b4 \ubaa8\ub378\uc778 ChatGPT\uc785\ub2c8\ub2e4. \ubb38\uc758\uc0ac\ud56d\uc774\ub098 \uc815\ubcf4\uac00 \ud544\uc694\ud558\uc2dc\uba74 \uc5b8\uc81c\ub4e0\uc9c0 \ub9d0\uc500\ud574 \uc8fc\uc138\uc694. \ub3c4\uc640\ub4dc\ub9b4 \uc218 \uc788\ub294 \ud55c\ub3c4 \ub0b4\uc5d0\uc11c \ucd5c\uc120\uc744 \ub2e4\ud558\uaca0\uc2b5\ub2c8\ub2e4!"}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 16, "completion_tokens": 72, "total_tokens": 88}}%                                                                                                                                                                                                   
curl http://localhost:52415/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
     "model": "phi-4",
     "messages": [{"role": "user", "content": "너는 어떤 기반으로 만들어졌니?"}],
     "temperature": 0.7
   }'
{"id": "chatcmpl-739e4a26-7652-4186-90bc-7aa4fb13dfbd", "object": "chat.completion", "created": 1736855808, "model": "phi-4", "system_fingerprint": "exo_0.0.1", "choices": [{"index": 0, "message": {"role": "assistant", "content": "\ub098\ub294 OpenAI\uc758 GPT-3\uc640 \uc720\uc0ac\ud55c \uc5b8\uc5b4 \ubaa8\ub378\uc744 \uae30\ubc18\uc73c\ub85c \ub9cc\ub4e4\uc5b4\uc84c\uc2b5\ub2c8\ub2e4. \uc774\ub7ec\ud55c \ubaa8\ub378\uc740 \ub300\ub7c9\uc758 \ud14d\uc2a4\ud2b8 \ub370\uc774\ud130\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud559\uc2b5\ub418\uba70, \uc774\ub97c \ud1b5\ud574 \ub2e4\uc591\ud55c \uc9c8\ubb38\uc5d0 \ub300\ud55c \uc751\ub2f5\uc744 \uc0dd\uc131\ud558\uace0 \ud14d\uc2a4\ud2b8\ub97c \uc0dd\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ud559\uc2b5 \uacfc\uc815\uc5d0\uc11c \ubaa8\ub378\uc740 \uc5b8\uc5b4\uc758 \ud328\ud134, \uad6c\uc870 \ubc0f \uc758\ubbf8\ub97c \uc774\ud574\ud558\uace0, \uc774\ub97c \ubc14\ud0d5\uc73c\ub85c \uc0c8\ub85c\uc6b4 \ud14d\uc2a4\ud2b8\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. \uc774\ub7ec\ud55c \ubaa8\ub378\uc740 \ud2b9\uc815 \ubaa9\uc801\uc5d0 \ub9de\uac8c \ud2b9\ubcc4\ud788 \ud6c8\ub828\ub418\uc5b4 \ub2e4\uc591\ud55c \uc8fc\uc81c\uc5d0 \ub300\ud55c \uc815\ubcf4\ub97c \uc81c\uacf5\ud558\uace0, \uc9c8\ubb38\uc5d0 \ub2f5\ubcc0\ud558\uba70, \ud14d\uc2a4\ud2b8\ub97c \uc0dd\uc131\ud558\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4."}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 27, "completion_tokens": 214, "total_tokens": 241}}

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

3 participants