Skip to content

Llava 1.6 34b broken responses from server #5637

@ikros98

Description

@ikros98

After this pull #5553 I am still having some inconsistencies in the response of the CLI and server.

CLI command: ./llava-cli -c 4096 --temp 0 -m ./ggml-yi-34b-f16-q_5_k.gguf --mmproj ./mmproj-llava-34b-f16-q6_k.gguf --n-gpu-layers 80000 --image ./fashion_image.jpg

Server command: ./server -c 4096 -m ./ggml-yi-34b-f16-q_5_k.gguf --host 0.0.0.0 --port 8000 --mmproj ./mmproj-llava-34b-f16-q6_k.gguf --n-gpu-layers 80000

This is the input:
fashion_image

CLI output: You've shared an image of a person wearing a stylish outfit. The individual is dressed in a plaid jacket with a fur collar, which adds a touch of luxury and warmth to the ensemble. They are also wearing a beret, which gives off a chic and sophisticated vibe. The accessories include what appears to be a brooch on the lapel of the jacket, adding an elegant detail to the outfit. Additionally, there's a bracelet visible on one wrist, contributing to the overall fashionable look. The person is seated comfortably with their hand resting on a pillow, suggesting they might be in a relaxed setting like a home or a boutique. The background features decorative elements such as a painting and what looks like an antique vase, which adds to the aesthetic of the scene. The lighting is soft and warm, enhancing the cozy atmosphere. If you have any specific questions about fashion, style, or anything else related to this image, feel free to ask! USER:

Server output: '<h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3><h3>'

Here there is also the output from the webui:
Screenshot 2024-02-21 at 15 40 32

I have found out that this problem triggers only when I am using the server and with 50% of my dataset and always with the same images.

I think the issue is probably connected to the converted base64 images but I don't know why and how.

Here there is the python code to use the APIs:

import requests
import base64

# Function to encode the image
def encode_image(image_path):
  with open(image_path, "rb") as image_file:
    return base64.b64encode(image_file.read()).decode('utf-8')

base64_image = encode_image("./fashion_image.jpg")

headers = {
    'Content-Type': 'application/json',
}

json_data = {
    'image_data': [{
        'data': base64_image, 
        'id': 10
    }],
    'prompt': '[img-10]Describe the image',
}

response = requests.post('http://0.0.0.0:8000/completion', headers=headers, json=json_data)
print(response.json()["content"])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions