alt.freeweights.llama / LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned
From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.llamaSubject:

LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned

Date: 2026-11-15Commit: 97f7d16Signed: 2DC28CC7B26A283B ✓

Zero shot classification model with 7.5B parameters. Safetensors weights, 15.0 GB in all. Published by microsoft under Apache-2.0.

7.5B params15.0GBLLM2CLIP-Llama-3-8B-Instruct-CC-Finetunedsafetensorspermissive
FactsParams7.5BSize15.0 GBFormatssafetensorsTaskzero shot classificationLicenseApache-2.0From sourcepermissive
$ fw get microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned
# manifest sha256 c7c980cd4295… · 15.0 GB · 13 files
$ fw verify ./LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned
From sourceHosted (signed)microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-FinetunedLast check: 2026-11-15 02:43 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
15.0 GB
Weights
15.0 GB (safetensors)
Parameters
7.5B
Formats
safetensors
Task
zero shot classification
License
Apache-2.0 (permissive)
Files
13, each with a sha256
Publisher
microsoft
Added
2026-11-15
Section
alt.freeweights.llama
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 02:43 UTCpassed

Model card

From the publisher at commit 97f7d16. Shown as plain text with links; images open at the publisher.

LLM2CLIP: Extending the Capability Boundaries of CLIP through Large Language Models#

Weiquan Huang1*, Aoqi Wu1*, Yifan Yang2†, Xufang Luo2, Yuqing Yang2, Liang Hu1, Qi Dai2, Xiyang Dai2, Dongdong Chen2, Chong Luo2, Lili Qiu2

1Tongji Universiy, 2Microsoft Corporation *Equal contribution † Corresponding to: yifanyang@microsoft.com

📂 GitHub 🆕 Blog 📜 LLM2CLIP

In this paper, we propose LLM2CLIP, a novel approach that embraces the power of LLMs to unlock CLIP’s potential. By fine-tuning the LLM in the caption space with contrastive learning, we extract its textual capabilities into the output embeddings, significantly improving the output layer’s textual discriminability. We then design an efficient training process where the fine-tuned LLM acts as a powerful teacher for CLIP’s visual encoder. Thanks to the LLM’s presence, we can now incorporate longer and more complex captions without being restricted by vanilla CLIP text encoder’s context window and ability limitations. Our experiments demonstrate that this approach brings substantial improvements in cross-modal tasks. Our method directly boosted the performance of the previously SOTA EVA02 model by 16.5% on both long-text and short-text retrieval tasks, transforming a CLIP model trained solely on English data into a state-of-the-art cross-lingual model. Moreover, when integrated into mul- timodal training with models like Llava 1.5, it consistently outperformed CLIP across nearly all benchmarks, demonstrating comprehensive performance improvements.

LLM2CLIP performance#

Image: summary_tab

It's important to note that all results presented in the paper are evaluated using PyTorch weights. There may be differences in performance when using Hugging Face (hf) models.

Model Details#

  • Model Type: vision foundation model, feature backbone
  • Pretrain Dataset: CC3M, CC12M, YFCC15M and Recap-DataComp-1B(30M subset)

Usage#

Huggingface Version#

Image Embeddings

from PIL import Image
from transformers import AutoModel
from transformers import CLIPImageProcessor
import torch

image_path = "CLIP.png"
model_name_or_path = "LLM2CLIP-Openai-L-14-336" # or /path/to/local/LLM2CLIP-Openai-L-14-336

processor = CLIPImageProcessor.from_pretrained("openai/clip-vit-large-patch14-336")
model = AutoModel.from_pretrained(
    model_name_or_path, 
    torch_dtype=torch.float16,
    trust_remote_code=True).to('cuda').eval()

image = Image.open(image_path)
input_pixels = processor(images=image, return_tensors="pt").pixel_values.to('cuda')

with torch.no_grad(), torch.cuda.amp.autocast():
    outputs = model.get_image_features(input_pixels)

Retrieval

from PIL import Image
from transformers import AutoModel, AutoConfig, AutoTokenizer
from transformers import CLIPImageProcessor
import torch
from llm2vec import LLM2Vec
import os

os.environ["CUDA_VISIBLE_DEVICES"] = "0"

processor = CLIPImageProcessor.from_pretrained("openai/clip-vit-large-patch14-336")
model_name_or_path = "microsoft/LLM2CLIP-Openai-L-14-336" # or /path/to/local/LLM2CLIP-Openai-L-14-336
model = AutoModel.from_pretrained(
    model_name_or_path, 
    torch_dtype=torch.bfloat16,
    trust_remote_code=True).to('cuda').eval()

llm_model_name = 'microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned'
config = AutoConfig.from_pretrained(
    llm_model_name, trust_remote_code=True
)
llm_model = AutoModel.from_pretrained(llm_model_name, torch_dtype=torch.bfloat16, config=config, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(llm_model_name)
llm_model.config._name_or_path = 'meta-llama/Meta-Llama-3-8B-Instruct' #  Workaround for LLM2VEC
l2v = LLM2Vec(llm_model, tokenizer, pooling_mode="mean", max_length=512, doc_max_length=512)

captions = ["a diagram", "a dog", "a cat"]
image_path = "CLIP.png"

image = Image.open(image_path)
input_pixels = processor(images=image, return_tensors="pt").pixel_values.to('cuda')
text_features = l2v.encode(captions, convert_to_tensor=True).to('cuda')

with torch.no_grad(), torch.cuda.amp.autocast():
    image_features = model.get_image_features(input_pixels)
    text_features = model.get_text_features(text_features)

    image_features /= image_features.norm(dim=-1, keepdim=True)
    text_features /= text_features.norm(dim=-1, keepdim=True)

    text_probs = (100.0 * image_features @ text_features.T).softmax(dim=-1)

print("Label probs:", text_probs)

BibTeX & Citation#

@misc{huang2024llm2clippowerfullanguagemodel,
      title={LLM2CLIP: Powerful Language Model Unlock Richer Visual Representation}, 
      author={Weiquan Huang and Aoqi Wu and Yifan Yang and Xufang Luo and Yuqing Yang and Liang Hu and Qi Dai and Xiyang Dai and Dongdong Chen and Chong Luo and Lili Qiu},
      year={2024},
      eprint={2411.04997},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2411.04997}, 
}

Files

13 files · 15.0 GBWeights 15.0 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 13 files with their sha256
FileSizesha256
.gitattributes1.79 KB1967eb797e706708e69a556c1a5616876c2828789dc78401e8455b82e0afbf5d
README.md5.47 KBa78f6d459f9e19bf62472ce300bda8e44510fb14bc2a8a697afd8dded47cab88
config.json835 Bf6f58d7b0745e61db7f11364d2cde5a79b8b441e405be662fe4cb17fdc97cd30
model-00001-of-00004.safetensors4.98 GB89d2978cc1e862d8f020697817335f98bab2eb81c0c95e36194b0884af0bf260
model-00002-of-00004.safetensors5.00 GB781c9768fb4c8da12e93686d7f5c95d4bf2144a4c8c5ea3b06bf24070bfbe548
model-00003-of-00004.safetensors4.92 GBedfbd80a5905a0c35b45bb41e976c9128e4bb2edec7066ac9aa078f9fb6cb00b
model-00004-of-00004.safetensors117 MBfaf91bee5f60a59ca899d0d6fd62e9a809cb7fca6519bea87937d664be2ec05c
model.safetensors.index.json22.2 KBc46becf7b0b10e2effaeef5c1ba82acb7e48270d6667fd5018f72743511ebae8
modeling_llama_encoder.py8.21 KBc67f2924485ce7f2eba196cb2511c145a0b30793a150e62bb63ebd12d1775fa5
special_tokens_map.json335 B849070cae53bd45439e64ce5b1ddd650a66081b1bd47895c5a58939a05055579
teaser.png156 KB96efdce73a60b5857328014a626e4a6004452e2444bc3a169c9d2b8b5f4a94ce
tokenizer.json9.09 MB52b583ee1699c6ca4468f70885bd5f96dd1f7517292362a67581038afc04f4d8
tokenizer_config.json51.0 KB0655c52e874137e4a455228155d982c4ea18419f461a10ceb57054995fec4223
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
97f7d164a1 pinned now2026-11-15 02:43 UTC13 files · 15.0 GB

Use it

$ fw get microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned
# manifest sha256 c7c980cd4295… · 15.0 GB · 13 files
$ fw verify ./LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned.json --dir ./LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned $ python3 fw.py verify ./LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned ./microsoft__LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned --revision 97f7d164a1eb89a79e344b21c7a1be7eee265d2e --local-dir ./LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
a78f6d459f9e19bf62472ce300bda8e44510fb14bc2a8a697afd8dded47cab88
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.llamaSubject: LLM2CLIP-Llama-3-8B-Instruct-CC-FinetunedDate: 2026-11-15Commit: 97f7d16Signed: 2DC28CC7B26A283B ✓
Upstream
microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned
Pinned commit
97f7d164a1eb89a79e344b21c7a1be7eee265d2e
Manifest
LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned.json · .minisig
Manifest sha256
c7c980cd429573c297a9cf2bc6c208bed2885ba6c038ee9815bb4eac2436aeb6
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:43 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned.json.minisig $ minisign -Vm LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. LLM2CLIP-Llama-3-8B-Instruct-CC-Finetuned.json. Provenance. Takedown history: none.
From: BAAI <huggingface.co/BAAI>Subject: Bunny-Llama-3-8B-V
From: BAAI <huggingface.co/BAAI>Subject: Bunny-Llama-3-8B-V-gguf
From: BAAI <huggingface.co/BAAI>Subject: Bunny-v1_1-Llama-3-8B-V
From: unsloth <huggingface.co/unsloth>Subject: codellama-7b
From: unsloth <huggingface.co/unsloth>Subject: codellama-7b-bnb-4bit
From: BAAI <huggingface.co/BAAI>Subject: Infinity-Instruct-3M-0613-Llama3-70B