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
File size: 1,982 Bytes
e7e5466 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | ---
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
``` |