Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

Duplicated from  quwsarohi/NanoAgent-135M

applexml
/
kimi-k2

Text Generation
MLX
Safetensors
English
llama
llm
tool-calling
lightweight
agentic-tasks
react
conversational
Model card Files Files and versions
xet
Community

Instructions to use applexml/kimi-k2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use applexml/kimi-k2 with MLX:

    # Make sure mlx-lm is installed
    # pip install --upgrade mlx-lm
    
    # Generate text with mlx-lm
    from mlx_lm import load, generate
    
    model, tokenizer = load("applexml/kimi-k2")
    
    prompt = "Write a story about Einstein"
    messages = [{"role": "user", "content": prompt}]
    prompt = tokenizer.apply_chat_template(
        messages, add_generation_prompt=True
    )
    
    text = generate(model, tokenizer, prompt=prompt, verbose=True)
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • LM Studio
  • MLX LM

    How to use applexml/kimi-k2 with MLX LM:

    Generate or start a chat session
    # Install MLX LM
    uv tool install mlx-lm
    # Interactive chat REPL
    mlx_lm.chat --model "applexml/kimi-k2"
    Run an OpenAI-compatible server
    # Install MLX LM
    uv tool install mlx-lm
    # Start the server
    mlx_lm.server --model "applexml/kimi-k2"
    # Calling the OpenAI-compatible server with curl
    curl -X POST "http://localhost:8000/v1/chat/completions" \
       -H "Content-Type: application/json" \
       --data '{
         "model": "applexml/kimi-k2",
         "messages": [
           {"role": "user", "content": "Hello"}
         ]
       }'
kimi-k2
281 MB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 3 commits
applexml's picture
applexml
Update README.md
d3f6119 verified 2 months ago
  • .gitattributes
    1.57 kB
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • Modelfile
    783 Bytes
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • README.md
    4.7 kB
    Update README.md 2 months ago
  • chat_template.jinja
    332 Bytes
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • config.json
    879 Bytes
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • generation_config.json
    132 Bytes
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • merges.txt
    466 kB
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • model.safetensors
    269 MB
    xet
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • model.safetensors.index.json
    19.5 kB
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • special_tokens_map.json
    655 Bytes
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • tokenization_kimi.py
    3.07 kB
    Upload 2 files 2 months ago
  • tokenizer.json
    2.1 MB
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • tokenizer_config.json
    3.76 kB
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • tool_declaration_ts.py
    878 Bytes
    Upload 2 files 2 months ago
  • train_graph.png
    59.9 kB
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • train_info.json
    8.86 MB
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago
  • vocab.json
    801 kB
    Duplicate from quwsarohi/NanoAgent-135M 2 months ago