Text Generation
Transformers
TensorBoard
ONNX
Safetensors
llama
Generated from Trainer
conversational
text-generation-inference
Instructions to use hypaai/hypa-tiny-keys with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hypaai/hypa-tiny-keys with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hypaai/hypa-tiny-keys") 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("hypaai/hypa-tiny-keys") model = AutoModelForCausalLM.from_pretrained("hypaai/hypa-tiny-keys", 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 hypaai/hypa-tiny-keys with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hypaai/hypa-tiny-keys" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hypaai/hypa-tiny-keys", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hypaai/hypa-tiny-keys
- SGLang
How to use hypaai/hypa-tiny-keys 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 "hypaai/hypa-tiny-keys" \ --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": "hypaai/hypa-tiny-keys", "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 "hypaai/hypa-tiny-keys" \ --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": "hypaai/hypa-tiny-keys", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hypaai/hypa-tiny-keys with Docker Model Runner:
docker model run hf.co/hypaai/hypa-tiny-keys
Training in progress, step 4587
Browse files- config.json +32 -0
- generation_config.json +12 -0
- model.safetensors +3 -0
- runs/Sep24_23-16-43_9b921b0a70e7/events.out.tfevents.1790291803.9b921b0a70e7.3485.0 +3 -0
- runs/Sep24_23-32-21_9b921b0a70e7/events.out.tfevents.1790292741.9b921b0a70e7.4048.0 +3 -0
- tokenizer.json +6 -1
- tokenizer_config.json +1 -1
- training_args.bin +3 -0
config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"dtype": "float32",
|
| 9 |
+
"eos_token_id": 5,
|
| 10 |
+
"head_dim": 40,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 320,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 960,
|
| 15 |
+
"max_position_embeddings": 512,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 8,
|
| 19 |
+
"num_hidden_layers": 8,
|
| 20 |
+
"num_key_value_heads": 2,
|
| 21 |
+
"pad_token_id": 2,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"rms_norm_eps": 1e-05,
|
| 24 |
+
"rope_parameters": {
|
| 25 |
+
"rope_theta": 10000.0,
|
| 26 |
+
"rope_type": "default"
|
| 27 |
+
},
|
| 28 |
+
"tie_word_embeddings": true,
|
| 29 |
+
"transformers_version": "5.17.0",
|
| 30 |
+
"use_cache": false,
|
| 31 |
+
"vocab_size": 16000
|
| 32 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
5
|
| 6 |
+
],
|
| 7 |
+
"output_attentions": false,
|
| 8 |
+
"output_hidden_states": false,
|
| 9 |
+
"pad_token_id": 2,
|
| 10 |
+
"transformers_version": "5.17.0",
|
| 11 |
+
"use_cache": true
|
| 12 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0222e5c5bd3ac6147469cc5ce3e823afe2b1fda29055f26646c5db579d8a66de
|
| 3 |
+
size 58192992
|
runs/Sep24_23-16-43_9b921b0a70e7/events.out.tfevents.1790291803.9b921b0a70e7.3485.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8c9f04ded14db58c27ddf7612c57fb7d677c92de64d5dd9f88a3d8ae751aab84
|
| 3 |
+
size 4345
|
runs/Sep24_23-32-21_9b921b0a70e7/events.out.tfevents.1790292741.9b921b0a70e7.4048.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4e86dedc27da2d948ab5d088eb74fb1283c582a920b57c42474a816d28501761
|
| 3 |
+
size 4827
|
tokenizer.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": {
|
| 4 |
+
"direction": "Right",
|
| 5 |
+
"max_length": 1000000,
|
| 6 |
+
"strategy": "LongestFirst",
|
| 7 |
+
"stride": 0
|
| 8 |
+
},
|
| 9 |
"padding": null,
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
tokenizer_config.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
| 20 |
"<|reserved_special_token_6|>",
|
| 21 |
"<|reserved_special_token_7|>"
|
| 22 |
],
|
| 23 |
-
"is_local":
|
| 24 |
"local_files_only": false,
|
| 25 |
"model_max_length": 512,
|
| 26 |
"pad_token": "<|finetune_right_pad_id|>",
|
|
|
|
| 20 |
"<|reserved_special_token_6|>",
|
| 21 |
"<|reserved_special_token_7|>"
|
| 22 |
],
|
| 23 |
+
"is_local": false,
|
| 24 |
"local_files_only": false,
|
| 25 |
"model_max_length": 512,
|
| 26 |
"pad_token": "<|finetune_right_pad_id|>",
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4acee6ce7241c45c7786dbdd670fdbe0253366ab8497d60bb363dfcb6f71e559
|
| 3 |
+
size 5265
|