Instructions to use AlexHung29629/FormoMouse123 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlexHung29629/FormoMouse123 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AlexHung29629/FormoMouse123") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AlexHung29629/FormoMouse123") model = AutoModelForCausalLM.from_pretrained("AlexHung29629/FormoMouse123") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use AlexHung29629/FormoMouse123 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AlexHung29629/FormoMouse123" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlexHung29629/FormoMouse123", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AlexHung29629/FormoMouse123
- SGLang
How to use AlexHung29629/FormoMouse123 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 "AlexHung29629/FormoMouse123" \ --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": "AlexHung29629/FormoMouse123", "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 "AlexHung29629/FormoMouse123" \ --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": "AlexHung29629/FormoMouse123", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AlexHung29629/FormoMouse123 with Docker Model Runner:
docker model run hf.co/AlexHung29629/FormoMouse123
Upload Llama4ForCausalLM
Browse files- config.json +4 -4
- generation_config.json +1 -1
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
"attention_chunk_size": 8192,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"attn_scale": 0.1,
|
| 9 |
-
"attn_temperature_tuning":
|
| 10 |
"bos_token_id": 2,
|
| 11 |
"cache_implementation": "hybrid",
|
| 12 |
"eos_token_id": 1,
|
|
@@ -54,7 +54,7 @@
|
|
| 54 |
"num_attention_heads": 16,
|
| 55 |
"num_experts_per_tok": 1,
|
| 56 |
"num_hidden_layers": 28,
|
| 57 |
-
"num_key_value_heads":
|
| 58 |
"num_local_experts": 16,
|
| 59 |
"output_router_logits": false,
|
| 60 |
"pad_token_id": 0,
|
|
@@ -65,8 +65,8 @@
|
|
| 65 |
"router_jitter_noise": 0.0,
|
| 66 |
"tie_word_embeddings": true,
|
| 67 |
"torch_dtype": "bfloat16",
|
| 68 |
-
"transformers_version": "4.
|
| 69 |
"use_cache": true,
|
| 70 |
-
"use_qk_norm":
|
| 71 |
"vocab_size": 262144
|
| 72 |
}
|
|
|
|
| 6 |
"attention_chunk_size": 8192,
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"attn_scale": 0.1,
|
| 9 |
+
"attn_temperature_tuning": 4,
|
| 10 |
"bos_token_id": 2,
|
| 11 |
"cache_implementation": "hybrid",
|
| 12 |
"eos_token_id": 1,
|
|
|
|
| 54 |
"num_attention_heads": 16,
|
| 55 |
"num_experts_per_tok": 1,
|
| 56 |
"num_hidden_layers": 28,
|
| 57 |
+
"num_key_value_heads": 16,
|
| 58 |
"num_local_experts": 16,
|
| 59 |
"output_router_logits": false,
|
| 60 |
"pad_token_id": 0,
|
|
|
|
| 65 |
"router_jitter_noise": 0.0,
|
| 66 |
"tie_word_embeddings": true,
|
| 67 |
"torch_dtype": "bfloat16",
|
| 68 |
+
"transformers_version": "4.51.3",
|
| 69 |
"use_cache": true,
|
| 70 |
+
"use_qk_norm": true,
|
| 71 |
"vocab_size": 262144
|
| 72 |
}
|
generation_config.json
CHANGED
|
@@ -4,5 +4,5 @@
|
|
| 4 |
"cache_implementation": "hybrid",
|
| 5 |
"eos_token_id": 1,
|
| 6 |
"pad_token_id": 0,
|
| 7 |
-
"transformers_version": "4.
|
| 8 |
}
|
|
|
|
| 4 |
"cache_implementation": "hybrid",
|
| 5 |
"eos_token_id": 1,
|
| 6 |
"pad_token_id": 0,
|
| 7 |
+
"transformers_version": "4.51.3"
|
| 8 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d5b9374055ac2ec373f39998f435a4866053127773528bb51e7327ae2e8b76e
|
| 3 |
+
size 1535262008
|