Instructions to use ResplendentAI/SOVL_Llama3_8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ResplendentAI/SOVL_Llama3_8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ResplendentAI/SOVL_Llama3_8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ResplendentAI/SOVL_Llama3_8B") model = AutoModelForCausalLM.from_pretrained("ResplendentAI/SOVL_Llama3_8B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ResplendentAI/SOVL_Llama3_8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ResplendentAI/SOVL_Llama3_8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ResplendentAI/SOVL_Llama3_8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ResplendentAI/SOVL_Llama3_8B
- SGLang
How to use ResplendentAI/SOVL_Llama3_8B 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 "ResplendentAI/SOVL_Llama3_8B" \ --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": "ResplendentAI/SOVL_Llama3_8B", "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 "ResplendentAI/SOVL_Llama3_8B" \ --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": "ResplendentAI/SOVL_Llama3_8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ResplendentAI/SOVL_Llama3_8B with Docker Model Runner:
docker model run hf.co/ResplendentAI/SOVL_Llama3_8B
TIP: Template
so, been using this model awhile now. it's pretty rad, though couple minor issues I've had with it, most of them resolved by finding a template setup, not listed for any default i know of. A combination of Llama3-Instruct and Mistral iirc. here it is:
{{ if .System }}<|start_header_id|>system
{{ .System }}<|end_header_id|>
{{ end }}{{ if .Prompt }}<|start_header_id|>user
{{ .Prompt }}<|end_header_id|>
{{ end }}<|start_header_id|>assistant
{{ .Response }}<|end_header_id|>
{"mirostat":2,"mirostat_eta":0.25,"mirostat_tau":4.5,"num_ctx":8192,"num_predict":288,"repeat_penalty":1.35,"temperature":1,"top_k":100,"top_p":0.8}
it's the mistral layout mostly, but, the im_ends and im_starts, are replaced or rather retained by the Llama3 headers instead. attempting to switch to the mistral ones had the prompt feel like a wet noodle, nasty and kind of dragged on.
Result- This, has the prompt no longer feeling like stiff vocabulary that the normal templates for Llama3 have had for me, constantly asking "what shall we explore friend" almost every prompt essentially depending on your settings. This is in Ollama btw, though i imagine this template will improve others like webui too! as i had noticed this issue in webui, albeit, a lot less constant.
It should resolve immediately, unless you have mirostat on at all though (or recently), give it a few prompts, maybe tidy up the system prompts, save reboot ollama load and try a few more prompts and should be seeing results by then which should gradually fully set in a bit if not by then
.
unless, i have some kind of anomaly build/settings in ollama, assuming not for now :P

