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
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

leonsarmiento
/
TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx

Text Generation
MLX
Safetensors
llama
mlx-lm
historical
conversational
8-bit precision
Model card Files Files and versions
xet
Community

Instructions to use leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx 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("leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx")
    
    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 Settings
  • LM Studio
  • MLX LM

    How to use leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx with MLX LM:

    Generate or start a chat session
    # Install MLX LM
    uv tool install mlx-lm
    # Interactive chat REPL
    mlx_lm.chat --model "leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx"
    Run an OpenAI-compatible server
    # Install MLX LM
    uv tool install mlx-lm
    # Start the server
    mlx_lm.server --model "leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx"
    # Calling the OpenAI-compatible server with curl
    curl -X POST "http://localhost:8000/v1/chat/completions" \
       -H "Content-Type: application/json" \
       --data '{
         "model": "leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx",
         "messages": [
           {"role": "user", "content": "Hello"}
         ]
       }'
TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx
1.23 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 7 commits
leonsarmiento's picture
leonsarmiento
Upload README.md with huggingface_hub
a50d8aa verified 24 days ago
  • .gitattributes
    1.52 kB
    initial commit 24 days ago
  • README.md
    1.62 kB
    Upload README.md with huggingface_hub 24 days ago
  • config.json
    954 Bytes
    Upload folder using huggingface_hub 24 days ago
  • generation_config.json
    154 Bytes
    Upload folder using huggingface_hub 24 days ago
  • model.safetensors
    1.22 GB
    xet
    Upload folder using huggingface_hub 24 days ago
  • model.safetensors.index.json
    36.1 kB
    Upload folder using huggingface_hub 24 days ago
  • special_tokens_map.json
    96 Bytes
    Upload folder using huggingface_hub 24 days ago
  • tokenizer.json
    2.24 MB
    Upload folder using huggingface_hub 24 days ago
  • tokenizer_config.json
    1.33 kB
    Upload tokenizer_config.json with huggingface_hub 24 days ago