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
Update config.json
Browse files- config.json +29 -29
config.json
CHANGED
|
@@ -22,34 +22,34 @@
|
|
| 22 |
"model_type": "llama4_text",
|
| 23 |
"moe_layers": [],
|
| 24 |
"no_rope_layers": [
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
],
|
| 54 |
"num_attention_heads": 16,
|
| 55 |
"num_experts_per_tok": 1,
|
|
@@ -67,6 +67,6 @@
|
|
| 67 |
"torch_dtype": "bfloat16",
|
| 68 |
"transformers_version": "4.52.4",
|
| 69 |
"use_cache": true,
|
| 70 |
-
"use_qk_norm":
|
| 71 |
"vocab_size": 262144
|
| 72 |
}
|
|
|
|
| 22 |
"model_type": "llama4_text",
|
| 23 |
"moe_layers": [],
|
| 24 |
"no_rope_layers": [
|
| 25 |
+
0,
|
| 26 |
+
0,
|
| 27 |
+
0,
|
| 28 |
+
0,
|
| 29 |
+
0,
|
| 30 |
+
0,
|
| 31 |
+
0,
|
| 32 |
+
0,
|
| 33 |
+
0,
|
| 34 |
+
0,
|
| 35 |
+
0,
|
| 36 |
+
0,
|
| 37 |
+
0,
|
| 38 |
+
0,
|
| 39 |
+
0,
|
| 40 |
+
0,
|
| 41 |
+
0,
|
| 42 |
+
0,
|
| 43 |
+
0,
|
| 44 |
+
0,
|
| 45 |
+
0,
|
| 46 |
+
0,
|
| 47 |
+
0,
|
| 48 |
+
0,
|
| 49 |
+
0,
|
| 50 |
+
0,
|
| 51 |
+
0,
|
| 52 |
+
0
|
| 53 |
],
|
| 54 |
"num_attention_heads": 16,
|
| 55 |
"num_experts_per_tok": 1,
|
|
|
|
| 67 |
"torch_dtype": "bfloat16",
|
| 68 |
"transformers_version": "4.52.4",
|
| 69 |
"use_cache": true,
|
| 70 |
+
"use_qk_norm": false,
|
| 71 |
"vocab_size": 262144
|
| 72 |
}
|