Instructions to use ProjectAstroAI/Sonke-1.0-350M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ProjectAstroAI/Sonke-1.0-350M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ProjectAstroAI/Sonke-1.0-350M", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ProjectAstroAI/Sonke-1.0-350M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ProjectAstroAI/Sonke-1.0-350M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ProjectAstroAI/Sonke-1.0-350M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ProjectAstroAI/Sonke-1.0-350M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ProjectAstroAI/Sonke-1.0-350M
- SGLang
How to use ProjectAstroAI/Sonke-1.0-350M 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 "ProjectAstroAI/Sonke-1.0-350M" \ --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": "ProjectAstroAI/Sonke-1.0-350M", "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 "ProjectAstroAI/Sonke-1.0-350M" \ --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": "ProjectAstroAI/Sonke-1.0-350M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ProjectAstroAI/Sonke-1.0-350M with Docker Model Runner:
docker model run hf.co/ProjectAstroAI/Sonke-1.0-350M
Download config.json from ProjectAstroAI/Sonke-1.0-350M: direct link, hf CLI and curl.
- Browser
- Download file 736 Bytes
-
https://huggingface.co/ProjectAstroAI/Sonke-1.0-350M/resolve/main/config.json
- Command line
-
hf download hf://ProjectAstroAI/Sonke-1.0-350M/config.json
-
curl -L -o config.json https://huggingface.co/ProjectAstroAI/Sonke-1.0-350M/resolve/main/config.json
736 Bytes
| { | |
| "architectures": [ | |
| "SonkeForCausalLM" | |
| ], | |
| "model_type": "sonke", | |
| "auto_map": { | |
| "AutoConfig": "modeling_sonke.SonkeConfig", | |
| "AutoModelForCausalLM": "modeling_sonke.SonkeForCausalLM" | |
| }, | |
| "vocab_size": 32768, | |
| "hidden_size": 1024, | |
| "num_hidden_layers": 26, | |
| "num_attention_heads": 16, | |
| "num_key_value_heads": 4, | |
| "intermediate_size": 2816, | |
| "rope_theta": 100000.0, | |
| "final_logit_softcapping": 30.0, | |
| "ngram_rows": 65536, | |
| "ngram_dim": 160, | |
| "ngram_layer": 1, | |
| "rms_norm_eps": 1e-06, | |
| "max_position_embeddings": 4096, | |
| "bos_token_id": null, | |
| "eos_token_id": 3, | |
| "pad_token_id": 1, | |
| "tie_word_embeddings": true, | |
| "torch_dtype": "float32", | |
| "training_step": 58666, | |
| "training_tokens": 22757507072 | |
| } | |