Run this model with HF Jobs

Run iamtatsuki05/Mistral-Bi-EN-0.5B-PT-stage2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/iamtatsuki05/Mistral-Bi-EN-0.5B-PT-stage2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/iamtatsuki05/Mistral-Bi-EN-0.5B-PT-stage2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Mistral-Bi-EN-0.5B-PT-stage2

English / Japanese

Overview

Mistral-Bi-EN-0.5B-PT-stage2 converts iamtatsuki05/Mistral-EN-0.5B-PT-stage2 into an LLM2Vec-style bidirectional encoder with roughly 0.5B non-embedding parameters, providing English sentence representations.

Consept

Usage

Requirements

transformers>=4.51.0
accelerate>=1.6.0
sentencepiece>=0.2.0
flash-attn>=2.7.3

Sample Code

import torch
import torch.nn.functional as F
from transformers import AutoModel, AutoTokenizer

model_name = "iamtatsuki05/Mistral-Bi-EN-0.5B-PT-stage2"
model_kwargs = {
  "torch_dtype": torch.bfloat16,
  "attn_implementation": "flash_attention_2",
  "device_map": "auto",
  "trust_remote_code": True,
  "use_auth_token": True,
}
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModel.from_pretrained(model_name, **model_kwargs)

queries = ["What is the capital of France?"]
docs = [
    "Paris is the capital and largest city of France, known for its art, culture, and history.",
    "Mount Fuji is the highest mountain in Japan and a well-known symbol of the country.",
]
q_emb = model.encode_query(queries, tokenizer)
d_emb = model.encode_document(docs, tokenizer)
scores = F.cosine_similarity(q_emb, d_emb)
print(scores)

Model Details

  • Base model: iamtatsuki05/Mistral-EN-0.5B-PT-stage2
  • Architecture: Mistral
  • Maximum sequence length: 8,192 tokens
  • Embedding dimension: 1536
  • Tokenizer: Mistral tokenizer / vocabulary size 32,000
  • Positional encoding: RoPE
  • Supported languages: English
  • Similarity metric: cosine

Licence

This model is distributed under the MIT License.

How to Cite

@inproceedings{MIREI,
  title={同一条件下における Encoder/Decoder アーキテクチャによる文埋め込みの性能分析},
  author={岡田 龍樹 and 杉本 徹},
  booktitle={言語処理学会第 32 回年次大会 (NLP2026)},
  year={2026}
}

@misc{okada2026decoder,
  title={What Makes Decoder-Based Sentence Embeddings Strong? Rethinking Encoder and Decoder Architectures for Sentence Embeddings},
  author={Tatsuki Okada and Toru Sugimoto and Yusuke Sakai and Taro Watanabe},
  year={2026},
  eprint={2611.41554},
  archivePrefix={arXiv},
  primaryClass={cs.CL},
  url={https://arxiv.org/abs/2611.41554}
}
Downloads last month
51
Safetensors
Model size
0.6B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for iamtatsuki05/Mistral-Bi-EN-0.5B-PT-stage2

Finetuned
(1)
this model
Finetunes
1 model

Collection including iamtatsuki05/Mistral-Bi-EN-0.5B-PT-stage2

Paper for iamtatsuki05/Mistral-Bi-EN-0.5B-PT-stage2