Downloads · 30 days
17
13% of all-time downloads
notlikejoe/tiny-random-MiniCPM-o-2_6
tiny-random-MiniCPM-o-2_6 is a text generation model from notlikejoe. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A minimal, randomly initialized version of MiniCPM-o-26 designed for testing and development purposes. This model maintains the same architecture as the original MiniCPM-o-26 but with drastically reduced dimensions to…
Downloads · 30 days
17
13% of all-time downloads
All-time downloads
133
Public
Parameters
6.2M
24.7 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors12.4 MB · 98%
From the Hugging Face model README
A minimal, randomly initialized version of MiniCPM-o-2_6 designed for testing and development purposes. This model maintains the same architecture as the original MiniCPM-o-2_6 but with drastically reduced dimensions to create a lightweight test model.
This is a tiny, randomly initialized version of the MiniCPM-o-2_6 multimodal model. It was created by scaling down the original model's dimensions while preserving the architecture structure. The model is intended for:
⚠️ Important: This model is randomly initialized and should NOT be used for production inference. It is designed solely for testing purposes.
The model maintains the same architecture as MiniCPM-o-2_6 but with reduced dimensions:
Language Model (LLM):
hidden_size: 40num_hidden_layers: 1num_attention_heads: 4num_key_value_heads: 2intermediate_size: 16max_position_embeddings: 128vocab_size: 151,700Vision Component:
hidden_size: 16num_hidden_layers: 1num_attention_heads: 4intermediate_size: 8patch_size: 14Audio/TTS Components:
init_audio: false)init_tts: false)from transformers import AutoModel, AutoTokenizer, AutoProcessor
import torch
from PIL import Image
# Load model and tokenizer
model_id = "notlikejoe/tiny-random-MiniCPM-o-2_6"
model = AutoModel.from_pretrained(model_id, trust_remote_code=True, torch_dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
# Prepare inputs
text = "Hello, how are you?"
image = Image.new('RGB', (224, 224), color='red') # Dummy image
# Process inputs
inputs = processor(text=text, images=image, return_tensors="pt")
# Forward pass
model.eval()
with torch.no_grad():
outputs = model(**inputs)
This model is compatible with Optimum-Intel for OpenVINO optimization:
from optimum.intel import OVModelForCausalLM
from transformers import AutoTokenizer
model_id = "notlikejoe/tiny-random-MiniCPM-o-2_6"
# Export to OpenVINO format
ov_model = OVModelForCausalLM.from_pretrained(
model_id,
export=True,
trust_remote_code=True
)
# Use for inference
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
The model has been validated to ensure:
✅ Model loads successfully from Hugging Face
✅ Config, tokenizer, and processor load correctly
✅ Model structure matches expected architecture
✅ Compatible with Optimum-Intel export
✅ Forward pass completes without errors
✅ OpenVINO compatibility fix applied: Resampler num_heads=0 issue resolved
This model includes a fix for the OpenVINO loading issue where num_heads=0 would occur with small embed_dim values. The resampler's num_heads calculation has been patched to ensure it's always at least 1:
# Original: num_heads = embed_dim // 128 # Would be 0 when embed_dim=40
# Fixed: num_heads = 1 if embed_dim < 128 else max(1, embed_dim // 128)
The modeling_minicpmo.py file included with this model contains this fix, ensuring compatibility with Optimum-Intel OpenVINO export and loading.
This model was not trained. It is a randomly initialized, dimensionally-reduced version of MiniCPM-o-2_6 created for testing purposes.
N/A - Model is randomly initialized.
This model is not intended for evaluation on standard benchmarks as it is randomly initialized.
If you use this model, please cite the original MiniCPM-o-2_6 model:
@misc{minicpm-o-2_6,
title={MiniCPM-o-2_6},
author={OpenBMB},
year={2024},
howpublished={\url{https://huggingface.co/openbmb/MiniCPM-o-2_6}}
}
For questions or issues related to this model, please open an issue in the repository.
This model is licensed under the Apache 2.0 License, same as the base model.