Text Generation
Transformers
Safetensors
English
Arabic
jais
English
Arabic
Decoder
Casual-lm
LLM
4-bit precision
custom_code
bitsandbytes
Instructions to use erfanvaredi/jais-7b-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use erfanvaredi/jais-7b-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="erfanvaredi/jais-7b-chat", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("erfanvaredi/jais-7b-chat", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use erfanvaredi/jais-7b-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "erfanvaredi/jais-7b-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "erfanvaredi/jais-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/erfanvaredi/jais-7b-chat
- SGLang
How to use erfanvaredi/jais-7b-chat 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 "erfanvaredi/jais-7b-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "erfanvaredi/jais-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "erfanvaredi/jais-7b-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "erfanvaredi/jais-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use erfanvaredi/jais-7b-chat with Docker Model Runner:
docker model run hf.co/erfanvaredi/jais-7b-chat
| { | |
| "_name_or_path": "core42/jais-13b-chat", | |
| "activation_function": "swiglu", | |
| "architectures": [ | |
| "JAISLMHeadModel" | |
| ], | |
| "attn_pdrop": 0.0, | |
| "auto_map": { | |
| "AutoConfig": "core42/jais-13b-chat--configuration_jais.JAISConfig", | |
| "AutoModel": "core42/jais-13b-chat--modeling_jais.JAISModel", | |
| "AutoModelForCausalLM": "core42/jais-13b-chat--modeling_jais.JAISLMHeadModel", | |
| "AutoModelForQuestionAnswering": "core42/jais-13b-chat--modeling_jais.JAISForQuestionAnswering", | |
| "AutoModelForSequenceClassification": "core42/jais-13b-chat--modeling_jais.JAISForSequenceClassification", | |
| "AutoModelForTokenClassification": "core42/jais-13b-chat--modeling_jais.JAISForTokenClassification" | |
| }, | |
| "bos_token_id": 0, | |
| "embd_pdrop": 0.0, | |
| "embeddings_scale": 14.6, | |
| "eos_token_id": 0, | |
| "initializer_range": 0.02, | |
| "layer_norm_epsilon": 1e-05, | |
| "model_type": "jais", | |
| "n_embd": 5120, | |
| "n_head": 40, | |
| "n_inner": 13653, | |
| "n_layer": 40, | |
| "n_positions": 2048, | |
| "pad_token_id": 0, | |
| "position_embedding_type": "alibi", | |
| "quantization_config": { | |
| "_load_in_4bit": true, | |
| "_load_in_8bit": false, | |
| "bnb_4bit_compute_dtype": "bfloat16", | |
| "bnb_4bit_quant_type": "nf4", | |
| "bnb_4bit_use_double_quant": true, | |
| "llm_int8_enable_fp32_cpu_offload": false, | |
| "llm_int8_has_fp16_weight": false, | |
| "llm_int8_skip_modules": null, | |
| "llm_int8_threshold": 6.0, | |
| "load_in_4bit": true, | |
| "load_in_8bit": false, | |
| "quant_method": "bitsandbytes" | |
| }, | |
| "reorder_and_upcast_attn": false, | |
| "resid_pdrop": 0.0, | |
| "scale_attn_by_inverse_layer_idx": false, | |
| "scale_attn_weights": true, | |
| "scale_qk_dot_by_d": true, | |
| "torch_dtype": "float16", | |
| "transformers_version": "4.38.0.dev0", | |
| "use_cache": true, | |
| "vocab_size": 84992, | |
| "width_scale": 0.11100000000000002 | |
| } | |