Text Generation
Transformers
Safetensors
GGUF
mixtral
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use sandepaAI/sandepa_ai_coder_435m_small_moe with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sandepaAI/sandepa_ai_coder_435m_small_moe with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sandepaAI/sandepa_ai_coder_435m_small_moe") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sandepaAI/sandepa_ai_coder_435m_small_moe") model = AutoModelForCausalLM.from_pretrained("sandepaAI/sandepa_ai_coder_435m_small_moe", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use sandepaAI/sandepa_ai_coder_435m_small_moe with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0 # Run inference directly in the terminal: llama cli -hf sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0 # Run inference directly in the terminal: llama cli -hf sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0
Use Docker
docker model run hf.co/sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0
- LM Studio
- Jan
- vLLM
How to use sandepaAI/sandepa_ai_coder_435m_small_moe with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sandepaAI/sandepa_ai_coder_435m_small_moe" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sandepaAI/sandepa_ai_coder_435m_small_moe", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0
- SGLang
How to use sandepaAI/sandepa_ai_coder_435m_small_moe 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 "sandepaAI/sandepa_ai_coder_435m_small_moe" \ --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": "sandepaAI/sandepa_ai_coder_435m_small_moe", "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 "sandepaAI/sandepa_ai_coder_435m_small_moe" \ --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": "sandepaAI/sandepa_ai_coder_435m_small_moe", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use sandepaAI/sandepa_ai_coder_435m_small_moe with Ollama:
ollama run hf.co/sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0
- Unsloth Studio
How to use sandepaAI/sandepa_ai_coder_435m_small_moe with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for sandepaAI/sandepa_ai_coder_435m_small_moe to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for sandepaAI/sandepa_ai_coder_435m_small_moe to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for sandepaAI/sandepa_ai_coder_435m_small_moe to start chatting
- Docker Model Runner
How to use sandepaAI/sandepa_ai_coder_435m_small_moe with Docker Model Runner:
docker model run hf.co/sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0
- Lemonade
How to use sandepaAI/sandepa_ai_coder_435m_small_moe with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sandepaAI/sandepa_ai_coder_435m_small_moe:Q8_0
Run and chat with the model
lemonade run user.sandepa_ai_coder_435m_small_moe-Q8_0
List all available models
lemonade list
- Atomic Chat
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 250, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "aux_loss": 2.3257370829582213, | |
| "entropy": 3.6007017314434053, | |
| "epoch": 0.04, | |
| "grad_norm": 1.0625, | |
| "learning_rate": 1.9280000000000002e-05, | |
| "loss": 3.8956069946289062, | |
| "mean_token_accuracy": 0.3586781073361635, | |
| "num_tokens": 72397.0, | |
| "step": 10 | |
| }, | |
| { | |
| "aux_loss": 2.3277345478534697, | |
| "entropy": 3.6272001445293425, | |
| "epoch": 0.08, | |
| "grad_norm": 1.0625, | |
| "learning_rate": 1.8480000000000003e-05, | |
| "loss": 3.896469497680664, | |
| "mean_token_accuracy": 0.3564587336033583, | |
| "num_tokens": 143657.0, | |
| "step": 20 | |
| }, | |
| { | |
| "aux_loss": 2.323074048757553, | |
| "entropy": 3.601874440908432, | |
| "epoch": 0.12, | |
| "grad_norm": 1.0390625, | |
| "learning_rate": 1.768e-05, | |
| "loss": 3.902561569213867, | |
| "mean_token_accuracy": 0.3605616968125105, | |
| "num_tokens": 215509.0, | |
| "step": 30 | |
| }, | |
| { | |
| "aux_loss": 2.3261504590511324, | |
| "entropy": 3.6270964324474333, | |
| "epoch": 0.16, | |
| "grad_norm": 1.09375, | |
| "learning_rate": 1.688e-05, | |
| "loss": 3.8741905212402346, | |
| "mean_token_accuracy": 0.3614043775945902, | |
| "num_tokens": 288789.0, | |
| "step": 40 | |
| }, | |
| { | |
| "aux_loss": 2.324697870016098, | |
| "entropy": 3.5004548013210295, | |
| "epoch": 0.2, | |
| "grad_norm": 0.99609375, | |
| "learning_rate": 1.6080000000000002e-05, | |
| "loss": 3.795322799682617, | |
| "mean_token_accuracy": 0.37013124153017996, | |
| "num_tokens": 361289.0, | |
| "step": 50 | |
| }, | |
| { | |
| "aux_loss": 2.3249743819236754, | |
| "entropy": 3.499809369444847, | |
| "epoch": 0.24, | |
| "grad_norm": 0.9921875, | |
| "learning_rate": 1.5280000000000003e-05, | |
| "loss": 3.755328369140625, | |
| "mean_token_accuracy": 0.37386555671691896, | |
| "num_tokens": 433139.0, | |
| "step": 60 | |
| }, | |
| { | |
| "aux_loss": 2.324633425474167, | |
| "entropy": 3.6745675444602965, | |
| "epoch": 0.28, | |
| "grad_norm": 0.9609375, | |
| "learning_rate": 1.448e-05, | |
| "loss": 3.902497100830078, | |
| "mean_token_accuracy": 0.36646418645977974, | |
| "num_tokens": 504919.0, | |
| "step": 70 | |
| }, | |
| { | |
| "aux_loss": 2.3186131000518797, | |
| "entropy": 3.470395928621292, | |
| "epoch": 0.32, | |
| "grad_norm": 0.9921875, | |
| "learning_rate": 1.3680000000000003e-05, | |
| "loss": 3.723850631713867, | |
| "mean_token_accuracy": 0.3796745929867029, | |
| "num_tokens": 576593.0, | |
| "step": 80 | |
| }, | |
| { | |
| "aux_loss": 2.3274434208869934, | |
| "entropy": 3.6475940525531767, | |
| "epoch": 0.36, | |
| "grad_norm": 0.94921875, | |
| "learning_rate": 1.2880000000000002e-05, | |
| "loss": 3.898761749267578, | |
| "mean_token_accuracy": 0.3605402667075396, | |
| "num_tokens": 650395.0, | |
| "step": 90 | |
| }, | |
| { | |
| "aux_loss": 2.3328470826148986, | |
| "entropy": 3.5895772576332092, | |
| "epoch": 0.4, | |
| "grad_norm": 1.125, | |
| "learning_rate": 1.2080000000000001e-05, | |
| "loss": 3.7831195831298827, | |
| "mean_token_accuracy": 0.3730145484209061, | |
| "num_tokens": 720132.0, | |
| "step": 100 | |
| }, | |
| { | |
| "aux_loss": 2.331581395864487, | |
| "entropy": 3.670157164335251, | |
| "epoch": 0.44, | |
| "grad_norm": 1.03125, | |
| "learning_rate": 1.128e-05, | |
| "loss": 3.955718231201172, | |
| "mean_token_accuracy": 0.35614234730601313, | |
| "num_tokens": 791175.0, | |
| "step": 110 | |
| }, | |
| { | |
| "aux_loss": 2.3278864681720735, | |
| "entropy": 3.564240163564682, | |
| "epoch": 0.48, | |
| "grad_norm": 1.0078125, | |
| "learning_rate": 1.0480000000000001e-05, | |
| "loss": 3.7921863555908204, | |
| "mean_token_accuracy": 0.37363966181874275, | |
| "num_tokens": 864007.0, | |
| "step": 120 | |
| }, | |
| { | |
| "aux_loss": 2.333659642934799, | |
| "entropy": 3.6451989471912385, | |
| "epoch": 0.52, | |
| "grad_norm": 0.95703125, | |
| "learning_rate": 9.68e-06, | |
| "loss": 3.894023132324219, | |
| "mean_token_accuracy": 0.35798243805766106, | |
| "num_tokens": 935475.0, | |
| "step": 130 | |
| }, | |
| { | |
| "aux_loss": 2.3140768826007845, | |
| "entropy": 3.50389506816864, | |
| "epoch": 0.56, | |
| "grad_norm": 1.0703125, | |
| "learning_rate": 8.880000000000001e-06, | |
| "loss": 3.7427852630615233, | |
| "mean_token_accuracy": 0.38606042340397834, | |
| "num_tokens": 1002776.0, | |
| "step": 140 | |
| }, | |
| { | |
| "aux_loss": 2.323524034023285, | |
| "entropy": 3.62218790948391, | |
| "epoch": 0.6, | |
| "grad_norm": 1.0078125, | |
| "learning_rate": 8.08e-06, | |
| "loss": 3.8935062408447267, | |
| "mean_token_accuracy": 0.36692074611783027, | |
| "num_tokens": 1074485.0, | |
| "step": 150 | |
| }, | |
| { | |
| "aux_loss": 2.319421482086182, | |
| "entropy": 3.6522460520267486, | |
| "epoch": 0.64, | |
| "grad_norm": 1.0546875, | |
| "learning_rate": 7.280000000000001e-06, | |
| "loss": 3.938425064086914, | |
| "mean_token_accuracy": 0.3640777923166752, | |
| "num_tokens": 1148295.0, | |
| "step": 160 | |
| }, | |
| { | |
| "aux_loss": 2.3238328874111174, | |
| "entropy": 3.635464870929718, | |
| "epoch": 0.68, | |
| "grad_norm": 0.9765625, | |
| "learning_rate": 6.480000000000001e-06, | |
| "loss": 3.839573287963867, | |
| "mean_token_accuracy": 0.3715536307543516, | |
| "num_tokens": 1220134.0, | |
| "step": 170 | |
| }, | |
| { | |
| "aux_loss": 2.3195456326007844, | |
| "entropy": 3.4972031474113465, | |
| "epoch": 0.72, | |
| "grad_norm": 0.921875, | |
| "learning_rate": 5.68e-06, | |
| "loss": 3.700027084350586, | |
| "mean_token_accuracy": 0.37758239097893237, | |
| "num_tokens": 1291904.0, | |
| "step": 180 | |
| }, | |
| { | |
| "aux_loss": 2.331765002012253, | |
| "entropy": 3.6483884513378144, | |
| "epoch": 0.76, | |
| "grad_norm": 0.8984375, | |
| "learning_rate": 4.880000000000001e-06, | |
| "loss": 3.873792266845703, | |
| "mean_token_accuracy": 0.36337695084512234, | |
| "num_tokens": 1363374.0, | |
| "step": 190 | |
| }, | |
| { | |
| "aux_loss": 2.3272350072860717, | |
| "entropy": 3.674150836467743, | |
| "epoch": 0.8, | |
| "grad_norm": 0.9609375, | |
| "learning_rate": 4.08e-06, | |
| "loss": 3.885345458984375, | |
| "mean_token_accuracy": 0.3636812623590231, | |
| "num_tokens": 1433716.0, | |
| "step": 200 | |
| }, | |
| { | |
| "aux_loss": 2.32773614525795, | |
| "entropy": 3.635636830329895, | |
| "epoch": 0.84, | |
| "grad_norm": 1.0078125, | |
| "learning_rate": 3.2800000000000004e-06, | |
| "loss": 3.8587207794189453, | |
| "mean_token_accuracy": 0.36572874560952184, | |
| "num_tokens": 1506681.0, | |
| "step": 210 | |
| }, | |
| { | |
| "aux_loss": 2.325718504190445, | |
| "entropy": 3.5308443903923035, | |
| "epoch": 0.88, | |
| "grad_norm": 0.95703125, | |
| "learning_rate": 2.4800000000000004e-06, | |
| "loss": 3.72619514465332, | |
| "mean_token_accuracy": 0.37508156448602675, | |
| "num_tokens": 1575868.0, | |
| "step": 220 | |
| }, | |
| { | |
| "aux_loss": 2.3259211778640747, | |
| "entropy": 3.433101177215576, | |
| "epoch": 0.92, | |
| "grad_norm": 0.9140625, | |
| "learning_rate": 1.6800000000000002e-06, | |
| "loss": 3.593972015380859, | |
| "mean_token_accuracy": 0.3888819687068462, | |
| "num_tokens": 1648038.0, | |
| "step": 230 | |
| }, | |
| { | |
| "aux_loss": 2.3294626414775848, | |
| "entropy": 3.597357761859894, | |
| "epoch": 0.96, | |
| "grad_norm": 0.9296875, | |
| "learning_rate": 8.8e-07, | |
| "loss": 3.8016372680664063, | |
| "mean_token_accuracy": 0.36985846906900405, | |
| "num_tokens": 1720626.0, | |
| "step": 240 | |
| }, | |
| { | |
| "aux_loss": 2.319813519716263, | |
| "entropy": 3.5566279590129852, | |
| "epoch": 1.0, | |
| "grad_norm": 1.0234375, | |
| "learning_rate": 8e-08, | |
| "loss": 3.757618713378906, | |
| "mean_token_accuracy": 0.3740091536194086, | |
| "num_tokens": 1788925.0, | |
| "step": 250 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 250, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 6391876233437184.0, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |