Skip to content

Inconsistent Embedding Outputs with qwen3-embedding-0.6B #649

Open
@Ztomepic

Description

@Ztomepic

Inconsistent Embedding Outputs with qwen3-embedding-0.6B


Problem Description

When vectorizing the same batch of inputs using qwen3-embedding-0.6B, the model occasionally returns two different embeddings:

  • Majority of runs: Result A
  • Minority of runs (~5%): Result B

Although the cosine similarity between A and B is very close to 1, the fact that the first embedding vector sometimes changes is both curious and concerning for downstream stability.


Environment

  • OS: Centos7
  • Model: qwen3-embedding-0.6B
  • TEI Version: 1.7.2
  • Client: Postman (HTTP POST)
  • Hardware: A100 80GB
  • Observed Frequency: ~5% of invocations return variant B

Reproduction Steps

  1. Prepare the JSON payload:
    {
      "inputs": [
        "\n数据建模规范:设计规范/规范/标签",
        "频率(i_style) 业表 rdm_[业务写]_[标名] [业名][标名] 运好(or)"
      ]
    }
  2. Send the request to the embedding endpoint in Postman.
  3. Repeat the request 50–100 times and collect all returned embeddings.

Expected Behavior

  • Consistency: The same input should always produce the identical embedding vector, ensuring reliable downstream retrieval and clustering.

Actual Behavior

  • Two distinct outputs:
    • Result A (≈95% of runs)
    • Result B (≈5% of runs)

Outputs

Only the first 5 dimensions are shown for brevity; actual embeddings are 1024 dimensions long.

Example A (Majority)

[
  [
    -0.033525728,
    0.002407345,
    -0.008492636,
    -0.014752968,
    0.035222610,
    
  ],
  [
    -0.033656940,
    -0.036949120,
    -0.006955928,
    -0.057693046,
    0.023221051,
    
  ]
]

Example B (Minority)

[
  [
    -0.033118628,
    0.002002977,
    -0.008502096,
    -0.014664467,
    0.035161767,
    
  ],
  [
    -0.033656940,
    -0.036949120,
    -0.006955928,
    -0.057693046,
    0.023221051,
    
  ]
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions