Run this model with HF Jobs
Run llmkat/llama on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/llmkat/llama. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/llmkat/llama on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/llmkat/llama. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/llmkat/llama. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use llmkat/llama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llmkat/llama with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="llmkat/llama")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("llmkat/llama") model = AutoModelForCausalLM.from_pretrained("llmkat/llama", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use llmkat/llama with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "llmkat/llama" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llmkat/llama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/llmkat/llama
- SGLang
How to use llmkat/llama 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 "llmkat/llama" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llmkat/llama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "llmkat/llama" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llmkat/llama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use llmkat/llama with Docker Model Runner:
docker model run hf.co/llmkat/llama
Add the checkpoint
Browse filesFiles changed (7)
- README.mdAdded+25
- config.jsonAdded+31
- design.jsonAdded+74
- generation_config.jsonAdded+6
- model.safetensorsAdded+3
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+9
12345678910111213141516171819202122232425---license: mitlibrary_name: transformerstags:- llmkat- testing- vllm- sglang---
# llmkat/llama
A hand-built Llama checkpoint whose greedy output is known in closed form. It's a test fixture for LLM serving engines, not a language model: all it does is follow a pointer chase over its prompt.
Serve it with any engine, for example vLLM, and check every token against the known answer:
```shgit clone https://github.com/sansblues/llmkat && cd llmkat && pip install numpyvllm serve llmkat/llama --enable-prefix-cachingpython check.py http://localhost:8000 llmkat/llama --family shared --passes 2```
Every correct token wins by about 39 nats, so a wrong token means the engine read the wrong KV-cache block, not a rounding difference. The features under test are the server's own flags.
How it works, results and limits: [github.com/sansblues/llmkat](https://github.com/sansblues/llmkat).12345678910111213141516171819202122232425262728293031{ "architectures": [ "LlamaForCausalLM" ], "model_type": "llama", "vocab_size": 8196, "hidden_size": 384, "intermediate_size": 128, "num_hidden_layers": 2, "num_attention_heads": 4, "num_key_value_heads": 2, "head_dim": 128, "hidden_act": "silu", "max_position_embeddings": 32768, "rms_norm_eps": 1e-06, "rope_theta": 1000000000000.0, "rope_parameters": { "rope_type": "default", "rope_theta": 1000000000000.0 }, "attention_bias": false, "attention_dropout": 0.0, "mlp_bias": false, "tie_word_embeddings": false, "bos_token_id": 0, "eos_token_id": 3, "pad_token_id": 3, "torch_dtype": "bfloat16", "dtype": "bfloat16", "use_cache": true}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374{ "arch": "llama", "K": 4096, "code_dim": 63, "rho_max": 0.22180108425210326, "sigma": 0.6109005421260516, "gap1_nats": 40.0, "gap2_nats": 40.0, "alpha": 100.0, "predicted_min_margin": 38.90994578739484, "lp_gap_per_unit": 0.2587826471730445, "Atot": 1748.758446144101, "s": 34.10375307808793, "theta": 1000000000000.0, "Lmax": 32768, "layer1_pairs": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21 ], "layer2_pairs": [ 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, 58, 59, 60, 61, 62, 63 ], "max_layer2_angle_at_Lmax": 0.03276799991726875}123456{ "bos_token_id": 0, "eos_token_id": 3, "pad_token_id": 3, "do_sample": false}123version https://git-lfs.github.com/spec/v1oid sha256:0899fb129064682ecebb18145817a2bdbfc5bab0a1b79b97f3996ade1f6a569esize 15544296123456789{ "tokenizer_class": "PreTrainedTokenizerFast", "bos_token": "<bos>", "eos_token": "<pad>", "pad_token": "<pad>", "unk_token": "<pad>", "model_max_length": 32768, "add_bos_token": false}README.mdAdded+25
config.jsonAdded+31
design.jsonAdded+74
generation_config.jsonAdded+6
model.safetensorsAdded+3
tokenizer.jsonAdded
tokenizer_config.jsonAdded+9