Instructions to use beezza/Yurika-Moe-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use beezza/Yurika-Moe-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("DataPilot/ArrowNeo-AME-4x3B-v0.1-MoE") model = PeftModel.from_pretrained(base_model, "beezza/Yurika-Moe-lora") - Transformers
How to use beezza/Yurika-Moe-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="beezza/Yurika-Moe-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("beezza/Yurika-Moe-lora", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use beezza/Yurika-Moe-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "beezza/Yurika-Moe-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "beezza/Yurika-Moe-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/beezza/Yurika-Moe-lora
- SGLang
How to use beezza/Yurika-Moe-lora 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 "beezza/Yurika-Moe-lora" \ --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": "beezza/Yurika-Moe-lora", "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 "beezza/Yurika-Moe-lora" \ --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": "beezza/Yurika-Moe-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use beezza/Yurika-Moe-lora with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for beezza/Yurika-Moe-lora to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for beezza/Yurika-Moe-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for beezza/Yurika-Moe-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="beezza/Yurika-Moe-lora", max_seq_length=2048, ) - Docker Model Runner
How to use beezza/Yurika-Moe-lora with Docker Model Runner:
docker model run hf.co/beezza/Yurika-Moe-lora
| {%- set user_messages = messages | selectattr('role', 'equalto', 'user') | list %} | |
| {%- macro output_available_tools(tools, message) %} | |
| {%- if tools and (message == user_messages[-1]) %} | |
| {{- '<|available_tools|>[' }} | |
| {%- for tool in tools %} | |
| {%- set tool = tool.function %} | |
| {{- "{" }} | |
| {%- for key, val in tool.items() if key != "return" %} | |
| {%- if val is string %} | |
| {{- "'" + key + "': '" + val + "'" }} | |
| {%- else %} | |
| {{- "'" + key + "': " + val|string }} | |
| {%- endif %} | |
| {%- if not loop.last %} | |
| {{- ", " }} | |
| {%- endif %} | |
| {%- endfor %} | |
| {{- "}" }} | |
| {%- if not loop.last %} | |
| {{- ", " }} | |
| {%- else %} | |
| {{- "]" }} | |
| {%- endif %} | |
| {%- endfor %} | |
| {{- eos_token -}} | |
| {%- endif %} | |
| {%- endmacro %} | |
| {%- macro output_tool_results(tool_results) %} | |
| {{- '<|tool_results|>[' }} | |
| {%- for tool_result in tool_results %} | |
| {{- "{'content': " + tool_result.content|string + ", 'call_id': '" + tool_result.call_id + "'}" }} | |
| {%- endfor %} | |
| {{- ']' }} | |
| {{- eos_token -}} | |
| {%- endmacro %} | |
| {%- macro output_tool_calls(tool_calls) %} | |
| {{- '<|tool_calls|>[' }} | |
| {%- for tool_call in tool_calls %} | |
| {{- "{'id': '" + tool_call.id + "', 'name': '" + tool_call.name + "', 'arguments': " + tool_call.arguments|string + '}' }} | |
| {%- endfor %} | |
| {{- ']' }} | |
| {%- endmacro %} | |
| {%- for message in messages %} | |
| {%- if message['role'] == 'user' %} | |
| {%- if tools is defined %} | |
| {{- output_available_tools(tools, message) }} | |
| {%- endif %} | |
| {{- '<|user|>' + message['content'] + eos_token -}} | |
| {%- elif message['role'] == 'system' %} | |
| {{- '<|system|>' + message['content'] + eos_token -}} | |
| {%- elif message['role'] == 'assistant' %} | |
| {% set assistant_content = "" %} | |
| {%- if message.content is defined %} | |
| {% set assistant_content = message.content %} | |
| {%- endif %} | |
| {%- if message.tool_calls is defined and message.tool_calls -%} | |
| {{- '<|assistant|>' + assistant_content + output_tool_calls(message['tool_calls']) + eos_token -}} | |
| {%- else %} | |
| {{- '<|assistant|>' + assistant_content + eos_token }} | |
| {%- endif %} | |
| {%- elif message['role'] == 'tool_results' %} | |
| {{- output_tool_results(message.tool_results) }} | |
| {%- endif %} | |
| {%- if loop.last and add_generation_prompt -%} | |
| {{- '<|assistant|>' -}} | |
| {%- endif -%} | |
| {%- endfor %} | |