Instructions to use m-a-p/Kun-LabelModel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use m-a-p/Kun-LabelModel with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="m-a-p/Kun-LabelModel")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("m-a-p/Kun-LabelModel") model = AutoModelForCausalLM.from_pretrained("m-a-p/Kun-LabelModel") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use m-a-p/Kun-LabelModel with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "m-a-p/Kun-LabelModel" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "m-a-p/Kun-LabelModel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/m-a-p/Kun-LabelModel
- SGLang
How to use m-a-p/Kun-LabelModel 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 "m-a-p/Kun-LabelModel" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "m-a-p/Kun-LabelModel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "m-a-p/Kun-LabelModel" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "m-a-p/Kun-LabelModel", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use m-a-p/Kun-LabelModel with Docker Model Runner:
docker model run hf.co/m-a-p/Kun-LabelModel
Upload config.json with huggingface_hub
Browse files- config.json +28 -0
config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/ML-A100/home/tianyu/Kun/data/sft_data/kun_sft/new_label_model/34B",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"bos_token_id": 1,
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 7168,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 20480,
|
| 14 |
+
"max_position_embeddings": 4096,
|
| 15 |
+
"model_type": "llama",
|
| 16 |
+
"num_attention_heads": 56,
|
| 17 |
+
"num_hidden_layers": 60,
|
| 18 |
+
"num_key_value_heads": 8,
|
| 19 |
+
"pretraining_tp": 1,
|
| 20 |
+
"rms_norm_eps": 1e-06,
|
| 21 |
+
"rope_scaling": null,
|
| 22 |
+
"rope_theta": 10000.0,
|
| 23 |
+
"tie_word_embeddings": false,
|
| 24 |
+
"torch_dtype": "float32",
|
| 25 |
+
"transformers_version": "4.36.0",
|
| 26 |
+
"use_cache": true,
|
| 27 |
+
"vocab_size": 64000
|
| 28 |
+
}
|