Instructions to use typeof/charizard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use typeof/charizard with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="typeof/charizard")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("typeof/charizard") model = AutoModelForCausalLM.from_pretrained("typeof/charizard") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use typeof/charizard with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "typeof/charizard" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "typeof/charizard", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/typeof/charizard
- SGLang
How to use typeof/charizard 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 "typeof/charizard" \ --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": "typeof/charizard", "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 "typeof/charizard" \ --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": "typeof/charizard", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use typeof/charizard with Docker Model Runner:
docker model run hf.co/typeof/charizard
Upload MistralForCausalLM
Browse files- config.json +2 -32
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "/content/
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
|
@@ -8,42 +8,12 @@
|
|
| 8 |
"eos_token_id": 2,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 128,
|
| 11 |
-
"id2label": {
|
| 12 |
-
"0": "O",
|
| 13 |
-
"1": "art",
|
| 14 |
-
"2": "building",
|
| 15 |
-
"3": "event",
|
| 16 |
-
"4": "location",
|
| 17 |
-
"5": "org",
|
| 18 |
-
"6": "other",
|
| 19 |
-
"7": "person",
|
| 20 |
-
"8": "product",
|
| 21 |
-
"9": "etc-0",
|
| 22 |
-
"10": "etc-1",
|
| 23 |
-
"11": "etc-2",
|
| 24 |
-
"12": "etc-3"
|
| 25 |
-
},
|
| 26 |
"initializer_range": 0.02,
|
| 27 |
"intermediate_size": 448,
|
| 28 |
-
"label2id": {
|
| 29 |
-
"O": 0,
|
| 30 |
-
"art": 1,
|
| 31 |
-
"building": 2,
|
| 32 |
-
"etc-0": 9,
|
| 33 |
-
"etc-1": 10,
|
| 34 |
-
"etc-2": 11,
|
| 35 |
-
"etc-3": 12,
|
| 36 |
-
"event": 3,
|
| 37 |
-
"location": 4,
|
| 38 |
-
"org": 5,
|
| 39 |
-
"other": 6,
|
| 40 |
-
"person": 7,
|
| 41 |
-
"product": 8
|
| 42 |
-
},
|
| 43 |
"max_position_embeddings": 1024,
|
| 44 |
"model_type": "mistral",
|
| 45 |
"num_attention_heads": 32,
|
| 46 |
-
"num_hidden_layers":
|
| 47 |
"num_key_value_heads": 8,
|
| 48 |
"pad_token_id": 3,
|
| 49 |
"rms_norm_eps": 1e-05,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "/content/charizard",
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
|
|
|
| 8 |
"eos_token_id": 2,
|
| 9 |
"hidden_act": "silu",
|
| 10 |
"hidden_size": 128,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
"intermediate_size": 448,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
"max_position_embeddings": 1024,
|
| 14 |
"model_type": "mistral",
|
| 15 |
"num_attention_heads": 32,
|
| 16 |
+
"num_hidden_layers": 32,
|
| 17 |
"num_key_value_heads": 8,
|
| 18 |
"pad_token_id": 3,
|
| 19 |
"rms_norm_eps": 1e-05,
|
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:44f30f30c67a5d37f027e422cd56dffe157112fd6eafcd745c4e98284c86fefd
|
| 3 |
+
size 27589912
|