Text Generation
Transformers
Safetensors
Korean
English
qwen2
mergekit
Merge
conversational
text-generation-inference
Instructions to use spow12/KoQwen_72B_v5.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use spow12/KoQwen_72B_v5.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="spow12/KoQwen_72B_v5.0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("spow12/KoQwen_72B_v5.0") model = AutoModelForCausalLM.from_pretrained("spow12/KoQwen_72B_v5.0", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use spow12/KoQwen_72B_v5.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "spow12/KoQwen_72B_v5.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "spow12/KoQwen_72B_v5.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/spow12/KoQwen_72B_v5.0
- SGLang
How to use spow12/KoQwen_72B_v5.0 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 "spow12/KoQwen_72B_v5.0" \ --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": "spow12/KoQwen_72B_v5.0", "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 "spow12/KoQwen_72B_v5.0" \ --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": "spow12/KoQwen_72B_v5.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use spow12/KoQwen_72B_v5.0 with Docker Model Runner:
docker model run hf.co/spow12/KoQwen_72B_v5.0
spow12/MK_Nemo_12B
Model Description
This model is a Supervised fine-tuned version of Qwen/Qwen2.5-72B-Instruct with DeepSpeed and trl for korean.
Merge methods.
merge_method: model_stock
name: ChatWaifu_72B_V2.4
models:
- model: Nexusflow/Athene-V2-Chat
- model: Nexusflow/Athene-V2-Agent
- model: Qwen/Qwen2.5-72B-Instruct_instruction_tunned(private)
- model: anthracite-org/magnum-v4-72b
base_model: Qwen/Qwen2.5-72B-Instruct
dtype: bfloat16
tokenizer_source: base
Trained Data
- Trained with public, private data (about 500K)
Usage
from transformers import TextStreamer, pipeline, AutoTokenizer, AutoModelForCausalLM
model_id = 'spow12/KoQwen_72B_v5.0'
tokenizer = AutoTokenizer.from_pretrained(model_id)
# %%
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
attn_implementation="flash_attention_2", #Optional
device_map='auto',
)
model.eval()
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device_map='auto')
generation_configs = dict(
max_new_tokens=2048,
num_return_sequences=1,
temperature=0.75,
# repetition_penalty=1.1,
do_sample=True,
top_k=20,
top_p=0.9,
min_p=0.1,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.eos_token_id,
streamer = TextStreamer(tokenizer) # Optional, if you want to use streamer, you have to set num_beams=1
)
sys_message = """당신은 친절한 챗봇으로서 상대방의 요청에 최대한 자세하고 친절하게 답해야합니다.
사용자가 제공하는 정보를 세심하게 분석하여 사용자의 의도를 신속하게 파악하고 그에 따라 답변을 생성해야합니다.
항상 매우 자연스러운 한국어로 응답하세요."""
message = [
{
'role': "system",
'content': sys_message
},
{
'role': 'user',
'content': "현재의 경제상황에 대해 어떻게 생각해?."
}
]
conversation = pipe(message, **generation_configs)
conversation[-1]
- Downloads last month
- 11
Model tree for spow12/KoQwen_72B_v5.0
Merge model
this model