Instructions to use wasmdashai/Wasm-Coder-8B-Instruct-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wasmdashai/Wasm-Coder-8B-Instruct-V1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wasmdashai/Wasm-Coder-8B-Instruct-V1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("wasmdashai/Wasm-Coder-8B-Instruct-V1") model = AutoModelForCausalLM.from_pretrained("wasmdashai/Wasm-Coder-8B-Instruct-V1") 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
- vLLM
How to use wasmdashai/Wasm-Coder-8B-Instruct-V1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wasmdashai/Wasm-Coder-8B-Instruct-V1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wasmdashai/Wasm-Coder-8B-Instruct-V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wasmdashai/Wasm-Coder-8B-Instruct-V1
- SGLang
How to use wasmdashai/Wasm-Coder-8B-Instruct-V1 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 "wasmdashai/Wasm-Coder-8B-Instruct-V1" \ --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": "wasmdashai/Wasm-Coder-8B-Instruct-V1", "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 "wasmdashai/Wasm-Coder-8B-Instruct-V1" \ --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": "wasmdashai/Wasm-Coder-8B-Instruct-V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use wasmdashai/Wasm-Coder-8B-Instruct-V1 with Docker Model Runner:
docker model run hf.co/wasmdashai/Wasm-Coder-8B-Instruct-V1
Use Docker
docker model run hf.co/wasmdashai/Wasm-Coder-8B-Instruct-V1Wasm-Coder-8B-Instruct-V1
Wasm-Coder-8B-Instruct-V1 is an 8-billion parameter instruction-tuned language model developed by wasmdashai, , code generation, and technical reasoning. It is designed to help developers working on edge computing, browser-based runtimes, and low-level systems programming.
🚀 Introduction
Wasm-Coder-8B-Instruct-V1 is part of the Wasm-Coder family—models specifically tailored for tasks involving WebAssembly, Rust, C/C++, and embedded systems programming. The model has been instruction-tuned on a diverse dataset combining code, documentation, compiler logs, and structured code reasoning tasks.
Key Features:
- Strong performance in code synthesis, bug fixing, and code explanation, especially for Rust and WebAssembly projects.
- Efficient for edge devices, browsers, and serverless runtimes.
- Based on a powerful transformer architecture with performance enhancements such as RoPE and SwiGLU.
- Trained with instruction-following datasets for natural conversations and multi-turn reasoning.
- Supports long-context processing (up to 32,768 tokens) with optional rope scaling.
🧠 Model Details
Architecture: Decoder-only transformer
Parameters: 8B
Training: Pretrained + Instruction fine-tuning
Supported Context Length: 32,768 tokens
Specialization: WebAssembly, Rust, C/C++, Systems Programming
Components:
- RoPE (Rotary Positional Embeddings)
- SwiGLU activation
- RMSNorm
- QKV Attention Bias
💻 Quickstart
Install dependencies:
pip install --upgrade transformers
Example code to load and run the model:
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "wasmdashai/Wasm-Coder-8B-Instruct-V1"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
prompt = "Write a Rust function that compiles to WebAssembly and adds two numbers."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
📚 Long-Context Support
To process long inputs (e.g., full source files or compiler traces), use YaRN-based RoPE scaling:
Add this to config.json:
{
"rope_scaling": {
"type": "yarn",
"factor": 4.0,
"original_max_position_embeddings": 32768
}
}
🔧 Use Cases
- WebAssembly code generation and debugging
- Rust/C++ code explanation and transformation
- Embedded/IoT code support
- Smart contract logic for blockchain environments using Wasm
- Code agents and assistants running in browsers
📬 Contact
📧 For questions, collaborations, or commercial licensing:
- Downloads last month
- 5
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "wasmdashai/Wasm-Coder-8B-Instruct-V1"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wasmdashai/Wasm-Coder-8B-Instruct-V1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'