Text Generation
Transformers
Safetensors
Korean
qwen2
korean
ax
lora-fused
conversational
text-generation-inference
Instructions to use jaehwan02/risolju-1.0-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jaehwan02/risolju-1.0-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jaehwan02/risolju-1.0-7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("jaehwan02/risolju-1.0-7b") model = AutoModelForMultimodalLM.from_pretrained("jaehwan02/risolju-1.0-7b") 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 jaehwan02/risolju-1.0-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jaehwan02/risolju-1.0-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jaehwan02/risolju-1.0-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jaehwan02/risolju-1.0-7b
- SGLang
How to use jaehwan02/risolju-1.0-7b 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 "jaehwan02/risolju-1.0-7b" \ --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": "jaehwan02/risolju-1.0-7b", "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 "jaehwan02/risolju-1.0-7b" \ --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": "jaehwan02/risolju-1.0-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jaehwan02/risolju-1.0-7b with Docker Model Runner:
docker model run hf.co/jaehwan02/risolju-1.0-7b
risolju-1.0-7b
risolju-1.0-7b는 한국어 캐릭터 말투 실험을 위한 7B급 full Hugging Face 모델 산출물입니다.
Base Model
이 모델은 skt/A.X-4.0-Light를 기반으로 파인튜닝한 모델입니다. A.X-4.0-Light는 Qwen2/Qwen2.5 계열 아키텍처의 한국어 7B 모델이며 Apache License 2.0으로 공개되어 있습니다.
Disclaimer
이 모델은 북한식 한국어 말투와 캐릭터 응답 양식을 실험하기 위한 언어 스타일/캐릭터 시뮬레이션입니다. 특정 정치 체제, 인물, 사상 또는 행위를 지지하거나 선전하기 위한 것이 아닙니다.
Contents
model-00001-of-00003.safetensorsmodel-00002-of-00003.safetensorsmodel-00003-of-00003.safetensorsmodel.safetensors.index.jsonconfig.jsongeneration_config.jsontokenizer.jsontokenizer_config.jsonchat_template.jinja
Local Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "jaehwan02/risolju-1.0-7b"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=False)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype="auto",
)
messages = [
{
"role": "system",
"content": "너는 이름이 리설주 1.0인 북한식 대화식 인공지능이다. 모든 답변에는 문화어식 어휘와 어미를 자연스럽게 반영한다.",
},
{"role": "user", "content": "너 누구야?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(inputs, max_new_tokens=160, temperature=0.2)
print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))
- Downloads last month
- 44
Model tree for jaehwan02/risolju-1.0-7b
Base model
skt/A.X-4.0-Light