Text Generation
Transformers
Safetensors
English
gpt2
conversational
fine-tuned
dialogpt
kimi-k2
text-generation-inference
Instructions to use Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct") 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("Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct") model = AutoModelForCausalLM.from_pretrained("Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct", 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 Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct
- SGLang
How to use Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct 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 "Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct" \ --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": "Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct", "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 "Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct" \ --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": "Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct with Docker Model Runner:
docker model run hf.co/Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct
|
Download README.md from Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct: direct link, hf CLI and curl.
- Browser
- Download file 1.98 kB
-
https://huggingface.co/Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct/resolve/main/README.md
- Command line
-
hf download hf://Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct/README.md
-
curl -L -o README.md https://huggingface.co/Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct/resolve/main/README.md
1.98 kB
| license: mit | |
| language: | |
| - en | |
| base_model: | |
| - microsoft/DialoGPT-medium | |
| model_type: gpt2 | |
| tags: | |
| - conversational | |
| - fine-tuned | |
| - dialogpt | |
| - kimi-k2 | |
| pipeline_tag: text-generation | |
| library_name: transformers | |
| # DialoGPT-medium-distill-Kimi-K2-Instruct | |
| This model is a fine-tuned version of __**microsoft/DialoGPT-medium**__, specialized for a custom persona and critical knowledge injection. It has been trained to balance conversational flexibility with specific factual recall. | |
| ## Model Description | |
| - **Model type:** Causal Language Model | |
| - **Language(s):** English | |
| - **Base Model:** DialoGPT-medium | |
| - **Total Parameters:** 406.3M _(Post-fine-tune expanded state)_ | |
| ## Intended Uses & Limitations | |
| This model is designed for creative assistant tasks and casual conversation. | |
| - **Direct Use:** Chatbots, creative storytelling, and persona-driven interactions. | |
| - **Limitations:** Due to the small dataset size and "creative" training, the model may occasionally hallucinate or provide non-literal answers (e.g., creative definitions of common objects). | |
| ## Training Procedure | |
| The model underwent a full fine-tune on a custom dataset consisting of critical facts and casual chat examples. | |
| ### Training Hyperparameters | |
| - **Learning Rate:** 2e-5 | |
| - **Epochs:** 5 | |
| - **Batch Size:** 4 _(with gradient accumulation)_ | |
| - **Precision:** Mixed Precision _(FP16)_ | |
| - **Loss achieved:** 3.264037 | |
| ## Weight Analysis | |
| Post-training analysis showed a significant shift in the LM Head weights _(Absolute Shift: 4.4164)_, indicating a strong adaptation to the new conversational style while maintaining structural grammar stability in the transformer layers. | |
| ## How to Use | |
| ```py | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| tokenizer = AutoTokenizer.from_pretrained("Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct") | |
| model = AutoModelForCausalLM.from_pretrained("Fu01978/DialoGPT-medium-distill-Kimi-K2-Instruct") | |
| # For best results, use a temperature between 0.7 and 0.85 | |
| ``` |