Instructions to use adrieljleo/indonesia-function-call-lora-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adrieljleo/indonesia-function-call-lora-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adrieljleo/indonesia-function-call-lora-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("adrieljleo/indonesia-function-call-lora-v2") model = AutoModelForCausalLM.from_pretrained("adrieljleo/indonesia-function-call-lora-v2") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use adrieljleo/indonesia-function-call-lora-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adrieljleo/indonesia-function-call-lora-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adrieljleo/indonesia-function-call-lora-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adrieljleo/indonesia-function-call-lora-v2
- SGLang
How to use adrieljleo/indonesia-function-call-lora-v2 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 "adrieljleo/indonesia-function-call-lora-v2" \ --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": "adrieljleo/indonesia-function-call-lora-v2", "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 "adrieljleo/indonesia-function-call-lora-v2" \ --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": "adrieljleo/indonesia-function-call-lora-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use adrieljleo/indonesia-function-call-lora-v2 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 adrieljleo/indonesia-function-call-lora-v2 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 adrieljleo/indonesia-function-call-lora-v2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for adrieljleo/indonesia-function-call-lora-v2 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="adrieljleo/indonesia-function-call-lora-v2", max_seq_length=2048, ) - Docker Model Runner
How to use adrieljleo/indonesia-function-call-lora-v2 with Docker Model Runner:
docker model run hf.co/adrieljleo/indonesia-function-call-lora-v2
adrieljleo/indonesia-function-call-lora-v2
This model is a fine-tuned version of unsloth/Meta-Llama-3.1-8B-Instruct, trained using the Unsloth framework to support Function Calling capabilities in a Bahasa Indonesia conversational setting. It is designed for use cases where a virtual assistant interacts with users in Indonesian, while still utilizing English-based function definitions, arguments, and schemas — suitable for applications such as virtual agents, chat-based interfaces, and backend integration with APIs or tool usage.
Training Overview
- Base Model: unsloth/Meta-Llama-3.1-8B-Instruct
- Framework: Unsloth
- Languages:
- Input/Output Conversations: Bahasa Indonesia
- Function Schemas/Descriptions: English
Datasets Trained
This model was trained using translated and aligned function-calling datasets based on English instruction-following data:
adrieljleo/skripzi_func_call_revision Translated version of glaiveai/glaive-function-calling-v2
adrieljleo/skripzi_parallel_revision Translated version of unaidedelf87777/parallel-function_calling-10k
These datasets were created and curated as part of an undergraduate thesis focusing on bridging language gaps in LLM function-calling systems.
Features
- Bahasa Indonesia instructions, questions, and conversations
- Function definitions, arguments, and descriptions remain in English for compatibility with tool-based APIs and automation pipelines that exists
- Ready for integration into applications involving Tool Use, Code Execution, or Conversational Interfaces
Chat Template
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
Environment: ipython
Cutting Knowledge Date: December 2023
Today Date: {datetime now}
You have access to the following functions:
Use the function '{function name}' to: {function description}
{function tool}
Think very carefully before calling functions.
If you choose to call a function, reply in the following format:
<{start_tag}={function_name}>{parameters}{end_tag}
where
start_tag => `<function`
parameters => a JSON dict with the function argument name as key and function argument value as value.
end_tag => `</function>`
Here is an example,
<function=example_function_name>{"example_name": "example_value"}</function>
Reminder:
- If looking for real time information use relevant functions before falling back to brave_search
- Function calls MUST follow the specified format, start with <function= and end with </function>
- Required parameters MUST be specified, if it missing then ask it
- Function calls can be multiple parallel by having a new line each
- Put the entire function call reply on one line
- The arguments value MUST be the same as original query and cannot be summarized
The example of function tool json schema
{
"name": "transfer_funds",
"description": "Transfer money to a specified recipient.",
"parameters": {
"type": "object",
"properties": {
"recipient_name": {"type": "string", "description": "Name of the recipient"},
"amount": {"type": "number", "description": "Amount to transfer"}
},
"required": ["recipient_name", "amount"]
}
}
Statements
This model was developed as part of an undergraduate thesis to explore the effectiveness of LLMs in Indonesian tool-use scenarios. Benchmarking has been conducted using the Berkeley Function Calling Leaderboard, where the model achieved a high score, outperforming several other open-source LLMs with Function Calling capabilities. However, the results should be interpreted with caution, as there were some misalignments in the custom benchmark classes used during evaluation. Further evaluation and refinement are planned, and updated results will be shared soon.
Uploaded model
- Developed by: adrieljleo
- License: apache-2.0
- Finetuned from model : unsloth/Meta-Llama-3.1-8B-Instruct
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 7
Model tree for adrieljleo/indonesia-function-call-lora-v2
Base model
meta-llama/Llama-3.1-8B