BioMiner-Instruct

6
2
llama-factory
by
jiaxianustc
Language Model
OTHER
32B params
New
6 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
72GB+ RAM
Mobile
Laptop
Server
Quick Summary

AI model with specialized capabilities.

Device Compatibility

Mobile
4-6GB RAM
Laptop
16GB RAM
Server
GPU
Minimum Recommended
30GB+ RAM

Code Examples

1. set pathtexttransformers
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, Qwen3VLForConditionalGeneration
import os
# 1. set path
base_model_path = "./qwen3-vl-32b-instruct"  # path of base model
lora_adapter_path = "./biominer-instruct-lora-adapter" # lora adapter path
save_path = "./biominer-instruct" # save path

print(f"Loading base model from: {base_model_path}")

# 2. load model and tokenizer
base_model = Qwen3VLForConditionalGeneration.from_pretrained(
    base_model_path,
    torch_dtype=torch.bfloat16,
    device_map="cpu"
)
tokenizer = AutoTokenizer.from_pretrained(base_model_path)

print(f"Loading LoRA adapter from: {lora_adapter_path}")

# 3. load PETF model 
model_with_lora = PeftModel.from_pretrained(base_model, lora_adapter_path, device_map="cpu")

print("Merging LoRA weights into the base model...")

# 4. key step:merge lora weight and remove lora layer
merged_model = model_with_lora.merge_and_unload()

print(f"Saving merged model to: {save_path}")

# 5. save model and tokenizer
merged_model.save_pretrained(save_path)
tokenizer.save_pretrained(save_path)

print("Done! The merged model has been saved.")

Deploy This Model

Production-ready deployment in minutes

Together.ai

Instant API access to this model

Fastest API

Production-ready inference API. Start free, scale to millions.

Try Free API

Replicate

One-click model deployment

Easiest Setup

Run models in the cloud with simple API. No DevOps required.

Deploy Now

Disclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.