Text Generation
Transformers
Safetensors
English
nessim
custom_code
small-language-model
base
pretrained
hybrid
gated-deltanet
looped
Instructions to use Nessim/Nessim-48M-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nessim/Nessim-48M-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Nessim/Nessim-48M-Base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Nessim/Nessim-48M-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Nessim/Nessim-48M-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Nessim/Nessim-48M-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nessim/Nessim-48M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Nessim/Nessim-48M-Base
- SGLang
How to use Nessim/Nessim-48M-Base 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 "Nessim/Nessim-48M-Base" \ --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": "Nessim/Nessim-48M-Base", "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 "Nessim/Nessim-48M-Base" \ --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": "Nessim/Nessim-48M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Nessim/Nessim-48M-Base with Docker Model Runner:
docker model run hf.co/Nessim/Nessim-48M-Base
Download config.json from Nessim/Nessim-48M-Base: direct link, hf CLI and curl.
- Browser
- Download file 998 Bytes
-
https://huggingface.co/Nessim/Nessim-48M-Base/resolve/main/config.json
- Command line
-
hf download hf://Nessim/Nessim-48M-Base/config.json
-
curl -L -o config.json https://huggingface.co/Nessim/Nessim-48M-Base/resolve/main/config.json
998 Bytes
| { | |
| "architectures": [ | |
| "NessimForCausalLM" | |
| ], | |
| "attention_every": 4, | |
| "auto_map": { | |
| "AutoConfig": "configuration_nessim.NessimConfig", | |
| "AutoModelForCausalLM": "modeling_nessim.NessimForCausalLM" | |
| }, | |
| "bos_token_id": 1, | |
| "copy_pointer": true, | |
| "decay_floor": -20.0, | |
| "distance_bias": true, | |
| "dtype": "float32", | |
| "eos_token_id": 2, | |
| "front_rank": 32, | |
| "gdn_head_dim": 128, | |
| "gdn_heads": 4, | |
| "gdn_norm_eps": 1e-05, | |
| "hidden_size": 512, | |
| "induction_inputs": true, | |
| "intermediate_size": 1536, | |
| "loops": 4, | |
| "max_position_embeddings": 2048, | |
| "model_type": "nessim", | |
| "n_bigrams": 125000, | |
| "n_coda": 2, | |
| "n_core": 6, | |
| "n_prelude": 2, | |
| "n_trigrams": 38000, | |
| "ngram_dim": 32, | |
| "num_attention_heads": 8, | |
| "num_hidden_layers": 10, | |
| "num_key_value_heads": 4, | |
| "pad_token_id": 0, | |
| "pointer_chunk": 128, | |
| "previous_tokens": 2, | |
| "rms_norm_eps": 1e-06, | |
| "rope_theta": 10000.0, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.23.0", | |
| "vocab_size": 4160 | |
| } | |