Text Generation
Transformers
Safetensors
lfm2_moe
Generated from Trainer
trl
sft
unsloth
conversational
compressed-tensors
Instructions to use Ba2han/augment-nvfp4a16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ba2han/augment-nvfp4a16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Ba2han/augment-nvfp4a16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Ba2han/augment-nvfp4a16") model = AutoModelForCausalLM.from_pretrained("Ba2han/augment-nvfp4a16") 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
- vLLM
How to use Ba2han/augment-nvfp4a16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Ba2han/augment-nvfp4a16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Ba2han/augment-nvfp4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Ba2han/augment-nvfp4a16
- SGLang
How to use Ba2han/augment-nvfp4a16 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 "Ba2han/augment-nvfp4a16" \ --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": "Ba2han/augment-nvfp4a16", "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 "Ba2han/augment-nvfp4a16" \ --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": "Ba2han/augment-nvfp4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use Ba2han/augment-nvfp4a16 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 Ba2han/augment-nvfp4a16 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 Ba2han/augment-nvfp4a16 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Ba2han/augment-nvfp4a16 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Ba2han/augment-nvfp4a16", max_seq_length=2048, ) - Docker Model Runner
How to use Ba2han/augment-nvfp4a16 with Docker Model Runner:
docker model run hf.co/Ba2han/augment-nvfp4a16
| { | |
| "architectures": [ | |
| "Lfm2MoeForCausalLM" | |
| ], | |
| "bos_token_id": 1, | |
| "conv_L_cache": 3, | |
| "conv_bias": false, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 7, | |
| "hidden_size": 2048, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 7168, | |
| "layer_types": [ | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "conv" | |
| ], | |
| "max_position_embeddings": 128000, | |
| "model_name": "augment-multi-ft2/checkpoint-1000", | |
| "model_type": "lfm2_moe", | |
| "moe_intermediate_size": 1792, | |
| "norm_eps": 1e-05, | |
| "norm_topk_prob": true, | |
| "num_attention_heads": 32, | |
| "num_dense_layers": 2, | |
| "num_experts": 32, | |
| "num_experts_per_tok": 4, | |
| "num_hidden_layers": 24, | |
| "num_key_value_heads": 8, | |
| "pad_token_id": 0, | |
| "quantization_config": { | |
| "config_groups": { | |
| "NVFP4A16": { | |
| "format": "nvfp4-pack-quantized", | |
| "input_activations": null, | |
| "output_activations": null, | |
| "targets": [ | |
| "Linear" | |
| ], | |
| "weights": { | |
| "actorder": null, | |
| "block_structure": null, | |
| "dynamic": false, | |
| "group_size": 16, | |
| "num_bits": 4, | |
| "observer": "memoryless_minmax", | |
| "observer_kwargs": {}, | |
| "scale_dtype": "torch.float8_e4m3fn", | |
| "strategy": "tensor_group", | |
| "symmetric": true, | |
| "type": "float", | |
| "zp_dtype": null | |
| } | |
| } | |
| }, | |
| "format": "nvfp4-pack-quantized", | |
| "global_compression_ratio": null, | |
| "ignore": [ | |
| "model.embed_tokens", | |
| "lm_head", | |
| "re:.*norm.*", | |
| "re:.*gate$", | |
| "re:.*\\.conv\\..*", | |
| "re:^model\\.layers\\.0\\..*", | |
| "re:^model\\.layers\\.1\\..*", | |
| "re:^model\\.layers\\.23\\..*" | |
| ], | |
| "kv_cache_scheme": null, | |
| "quant_method": "compressed-tensors", | |
| "quantization_status": "compressed", | |
| "sparsity_config": {}, | |
| "transform_config": {}, | |
| "version": "0.14.0.1" | |
| }, | |
| "rope_parameters": { | |
| "rope_theta": 1000000.0, | |
| "rope_type": "default" | |
| }, | |
| "routed_scaling_factor": 1.0, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.3.0", | |
| "unsloth_version": "2026.3.4", | |
| "use_cache": false, | |
| "use_expert_bias": true, | |
| "vocab_size": 65536 | |
| } |