CoolFace
Modelpublic

wasmdashai/Wasm-Coder-8B-Instruct-V1

sourceHugging Faceupdated 1y agoView on Hugging Face
3likes21downloads
Model Card

Wasm-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:

bash
pip install --upgrade transformers

Example code to load and run the model:

python
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:

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:

[modelasg@gmail.com](mailto:modelasg@gmail.com)