Instructions to use OddTheGreat/Luna_12B_V.3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OddTheGreat/Luna_12B_V.3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OddTheGreat/Luna_12B_V.3") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("OddTheGreat/Luna_12B_V.3") model = AutoModelForMultimodalLM.from_pretrained("OddTheGreat/Luna_12B_V.3", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OddTheGreat/Luna_12B_V.3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OddTheGreat/Luna_12B_V.3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OddTheGreat/Luna_12B_V.3", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/OddTheGreat/Luna_12B_V.3
- SGLang
How to use OddTheGreat/Luna_12B_V.3 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 "OddTheGreat/Luna_12B_V.3" \ --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": "OddTheGreat/Luna_12B_V.3", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "OddTheGreat/Luna_12B_V.3" \ --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": "OddTheGreat/Luna_12B_V.3", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use OddTheGreat/Luna_12B_V.3 with Docker Model Runner:
docker model run hf.co/OddTheGreat/Luna_12B_V.3
Luna_12B_V.3
This is a merge of pre-trained language models.
I'm tired of Mistral 24B, but sadly, it seems there are no consumer-grade models as good for roleplaying as it is.
However, some smaller models are worth trying. 12B Gemma is one of them.
The goal of this merge was to create a non-thinking, all-around model for everyday use, primarily on RU.
Model is capable of roleplaying and is not overly censored. (Extreme stuff wasn't tested, in my use scenarios, i haven't encountered refusals or strong indirect censorship.)
In rp, the model is able to act as an antagonist or describe harmful content.
The model works well as an assistant. I tested formatted responses, document citation, etc. (For this usage, a low temperature is better, around T0.2.)
The model is good at context attention and perceiving small details such as part numbers or dates. In a roleplaying, context attention is comparable to 24B Mistral.
RU is excellent. While RU RP was tested briefly, the assistant on RU was tested extensively. For a 12B model, the performance is great.
Of course, it's only a 12B model, with limitations and problems corresponding to its size, but for a 12B model, it works very well.
Vision is present. Works, but vision isn't my thing so i can't tell more.
I've noticed a small repetition problem when the model gives one long answer. (The context becomes poisoned by a long, monotonous answer, and because of the excellent attention, the model starts to repeat itself more and more.) It's probably fixable with a repetition penalty setting, but I haven't figured out the sweet spot where it works without breaking the response too much. On shorter answers this problem didn't occured.
Tested on the GemmaT4 preset, modified Shingane sysprompt T0.8 - 1.04 for roleplaying; a custom assistant sysprompt, T0.21 for work.
Also tested by chance on rx 6600xt and on gtx 1060 6gb (with offload ofc), it works and speed was even bearable.
- Downloads last month
- 26