Instructions to use efficiencyx/Jun-LoRA-12B-Safetensor with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use efficiencyx/Jun-LoRA-12B-Safetensor with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="efficiencyx/Jun-LoRA-12B-Safetensor") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("efficiencyx/Jun-LoRA-12B-Safetensor") model = AutoModelForMultimodalLM.from_pretrained("efficiencyx/Jun-LoRA-12B-Safetensor", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use efficiencyx/Jun-LoRA-12B-Safetensor with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "efficiencyx/Jun-LoRA-12B-Safetensor" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "efficiencyx/Jun-LoRA-12B-Safetensor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/efficiencyx/Jun-LoRA-12B-Safetensor
- SGLang
How to use efficiencyx/Jun-LoRA-12B-Safetensor with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "efficiencyx/Jun-LoRA-12B-Safetensor" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "efficiencyx/Jun-LoRA-12B-Safetensor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "efficiencyx/Jun-LoRA-12B-Safetensor" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "efficiencyx/Jun-LoRA-12B-Safetensor", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use efficiencyx/Jun-LoRA-12B-Safetensor with Docker Model Runner:
docker model run hf.co/efficiencyx/Jun-LoRA-12B-Safetensor
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM
processor = AutoProcessor.from_pretrained("efficiencyx/Jun-LoRA-12B-Safetensor")
model = AutoModelForMultimodalLM.from_pretrained("efficiencyx/Jun-LoRA-12B-Safetensor", device_map="auto")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
inputs = processor.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))Jun-12B Safetensor (v8)
Merged bf16 weights of the v8 Jun LoRA on Gemma 4 12B (QAT), for vLLM and transformers. This is what the Jun OS Colab notebook serves when it runs on a TPU. Same fine-tune as the v8 GGUF release, see that card for what changed in v8.
Model Variants & Repositories
| Repository | Format | Description |
|---|---|---|
efficiencyx/Jun-LoRA-12B-Safetensor |
safetensors, bf16 | This repo: v8, full precision |
efficiencyx/Jun-LoRA-12B-Safetensor-INT8 |
safetensors, INT8 W8A8 | v8 for TPUs with 16 GB (v5e-1) |
efficiencyx/Jun-LoRA-12B-GGUF |
GGUF | v8 for llama.cpp and Ollama |
efficiencyx/Jun-LoRA-12B-Safetensor-v7 |
safetensors, bf16 | Previous generation (v7) |
Merge
The v8 adapter (r 32, rsLoRA, alpha folded to 181.02) merged into the base with PEFT 0.18.1: all 328 attention and MLP projections of the language model. The vision and audio input embedder are untouched, and the chat template is the base model's, byte for byte.
Usage
vllm serve efficiencyx/Jun-LoRA-12B-Safetensor --served-model-name jun --max-model-len 8192
22.3 GiB of weights: a TPU v6e-1 (32 GB) runs it, a v5e-1 (16 GB) needs the INT8 build.
- Downloads last month
- 56
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="efficiencyx/Jun-LoRA-12B-Safetensor") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)