Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

TimoZhou1024
/
werewolf-kto-lora2

Text Generation
PEFT
Safetensors
Transformers
llama-factory
lora
kto
conversational
Model card Files Files and versions
xet
Community

Instructions to use TimoZhou1024/werewolf-kto-lora2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • PEFT

    How to use TimoZhou1024/werewolf-kto-lora2 with PEFT:

    from peft import PeftModel
    from transformers import AutoModelForCausalLM
    
    base_model = AutoModelForCausalLM.from_pretrained("werewolf_sft2_merged")
    model = PeftModel.from_pretrained(base_model, "TimoZhou1024/werewolf-kto-lora2")
  • Transformers

    How to use TimoZhou1024/werewolf-kto-lora2 with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="TimoZhou1024/werewolf-kto-lora2")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("TimoZhou1024/werewolf-kto-lora2", dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use TimoZhou1024/werewolf-kto-lora2 with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "TimoZhou1024/werewolf-kto-lora2"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "TimoZhou1024/werewolf-kto-lora2",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    Use Docker
    docker model run hf.co/TimoZhou1024/werewolf-kto-lora2
  • SGLang

    How to use TimoZhou1024/werewolf-kto-lora2 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 "TimoZhou1024/werewolf-kto-lora2" \
        --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": "TimoZhou1024/werewolf-kto-lora2",
    		"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 "TimoZhou1024/werewolf-kto-lora2" \
            --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": "TimoZhou1024/werewolf-kto-lora2",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use TimoZhou1024/werewolf-kto-lora2 with Docker Model Runner:

    docker model run hf.co/TimoZhou1024/werewolf-kto-lora2
werewolf-kto-lora2
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
TimoZhou1024's picture
TimoZhou1024
Upload folder using huggingface_hub
9d875f5 verified 8 days ago
  • .gitattributes
    1.57 kB
    Upload folder using huggingface_hub 8 days ago
  • README.md
    1.55 kB
    Upload folder using huggingface_hub 8 days ago
  • adapter_config.json
    1.05 kB
    Upload folder using huggingface_hub 8 days ago
  • adapter_model.safetensors
    66.1 MB
    xet
    Upload folder using huggingface_hub 8 days ago
  • all_results.json
    246 Bytes
    Upload folder using huggingface_hub 8 days ago
  • chat_template.jinja
    541 Bytes
    Upload folder using huggingface_hub 8 days ago
  • llamaboard_config.yaml
    2.32 kB
    Upload folder using huggingface_hub 8 days ago
  • tokenizer.json
    11.4 MB
    xet
    Upload folder using huggingface_hub 8 days ago
  • tokenizer_config.json
    721 Bytes
    Upload folder using huggingface_hub 8 days ago
  • train_results.json
    246 Bytes
    Upload folder using huggingface_hub 8 days ago
  • trainer_log.jsonl
    7.81 kB
    Upload folder using huggingface_hub 8 days ago
  • trainer_state.json
    20.3 kB
    Upload folder using huggingface_hub 8 days ago
  • training_args.yaml
    792 Bytes
    Upload folder using huggingface_hub 8 days ago
  • training_loss.png
    44.8 kB
    Upload folder using huggingface_hub 8 days ago
  • training_rewards_chosen.png
    39.3 kB
    Upload folder using huggingface_hub 8 days ago