Text Generation
Transformers
Safetensors
Korean
llama
lora-merged
model-soup
weight-averaging
korean
k-ai-leaderboard
conversational
text-generation-inference
Instructions to use jwg0830/AX-3.1-Light-sft_v3_1b_0.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jwg0830/AX-3.1-Light-sft_v3_1b_0.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jwg0830/AX-3.1-Light-sft_v3_1b_0.5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jwg0830/AX-3.1-Light-sft_v3_1b_0.5") model = AutoModelForCausalLM.from_pretrained("jwg0830/AX-3.1-Light-sft_v3_1b_0.5", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jwg0830/AX-3.1-Light-sft_v3_1b_0.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jwg0830/AX-3.1-Light-sft_v3_1b_0.5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jwg0830/AX-3.1-Light-sft_v3_1b_0.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jwg0830/AX-3.1-Light-sft_v3_1b_0.5
- SGLang
How to use jwg0830/AX-3.1-Light-sft_v3_1b_0.5 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 "jwg0830/AX-3.1-Light-sft_v3_1b_0.5" \ --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": "jwg0830/AX-3.1-Light-sft_v3_1b_0.5", "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 "jwg0830/AX-3.1-Light-sft_v3_1b_0.5" \ --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": "jwg0830/AX-3.1-Light-sft_v3_1b_0.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jwg0830/AX-3.1-Light-sft_v3_1b_0.5 with Docker Model Runner:
docker model run hf.co/jwg0830/AX-3.1-Light-sft_v3_1b_0.5
Download chat_template.jinja from jwg0830/AX-3.1-Light-sft_v3_1b_0.5: direct link, hf CLI and curl.
- Browser
- Download file 4 kB
-
https://huggingface.co/jwg0830/AX-3.1-Light-sft_v3_1b_0.5/resolve/main/chat_template.jinja
- Command line
-
hf download hf://jwg0830/AX-3.1-Light-sft_v3_1b_0.5/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/jwg0830/AX-3.1-Light-sft_v3_1b_0.5/resolve/main/chat_template.jinja
4 kB
| {%- if tools is iterable and tools | length > 0 %} | |
| {{- '<|im_start|><|system|>'}} | |
| {{- '당신은 도구 호출 기능을 갖춘 유용한 도우미입니다. 사용자의 요청을 처리하기 위해서 필요한 도구가 주어진 목록에 있는 경우 도구 호출로 응답하세요. | |
| 필요한 도구가 목록에 없는 경우에는 도구 호출 없이 사용자가 요구한 정보를 제공하세요. | |
| 필요한 도구가 목록에 있지만 해당 도구를 호출하는데 필요한 argument 정보가 부족한 경우 해당 정보를 사용자에게 요청하세요. | |
| 사용자의 요청을 처리하기 위해 여러번 도구를 호출할 수 있어야 합니다. | |
| 도구 호출 이후 도구 실행 결과를 입력으로 받으면 해당 결과를 활용하여 답변을 생성하세요. | |
| 다음은 접근할 수 있는 도구들의 목록 입니다: | |
| <tools> | |
| '}} | |
| {%- for t in tools %} | |
| {{- t | tojson }} | |
| {{- ' | |
| ' }} | |
| {%- endfor %} | |
| {{- '</tools>' }} | |
| {{- ' | |
| 도구를 호출하려면 아래의 JSON으로 응답하세요. | |
| 도구 호출 형식: <tool_call>{"name": 도구 이름, "arguments": dictionary 형태의 도구 인자값}</tool_call>' }} | |
| {{- '<|im_end|>' }} | |
| {%- endif %} | |
| {%- for message in messages %} | |
| {%- if message.role == 'system' %} | |
| {{- '<|im_start|><|system|>' + message.content + '<|im_end|>'}} | |
| {%- elif message.role == 'user' %} | |
| {{- '<|im_start|><|user|>' + message.content + '<|im_end|>'}} | |
| {%- elif message.role == 'assistant' %} | |
| {{- '<|im_start|><|assistant|>'}} | |
| {%- set content = '' %} | |
| {%- if message.content is defined %} | |
| {%- set content = message.content %} | |
| {%- endif %} | |
| {%- if add_generation_prompt and not (message.reasoning_content is defined and message.reasoning_content is not none) %} | |
| {%- if '</think>' in message.content %} | |
| {%- set content = message.content.split('</think>'.strip())[-1].lstrip('\n') %} | |
| {%- endif %} | |
| {%- endif %} | |
| {{- content}} | |
| {%- if message.tool_calls is defined %} | |
| {%- for tool_call in message.tool_calls %} | |
| {%- if tool_call.function is defined %} | |
| {%- set tool_call = tool_call.function %} | |
| {%- endif %} | |
| {{- '<tool_call>' }} | |
| {{- '{' }} | |
| {{- '"name": "' }} | |
| {{- tool_call.name }} | |
| {{- '"' }} | |
| {%- if tool_call.arguments is defined %} | |
| {{- ', ' }} | |
| {{- '"arguments": ' }} | |
| {{- tool_call.arguments|tojson }} | |
| {%- endif %} | |
| {{- '}' }} | |
| {{- '</tool_call>' }} | |
| {%- endfor %} | |
| {%- endif %} | |
| {{- '<|im_end|>'}} | |
| {%- elif message.role == 'tool' %} | |
| {{- '<|im_start|><|extra_id_13|><tool_output>' + message.content + '</tool_output><|im_end|>'}} | |
| {%- endif %} | |
| {%- endfor %} | |
| {%- if add_generation_prompt %} | |
| {{- '<|im_start|><|assistant|>' }} | |
| {%- endif %} |