Text Generation
Transformers
Safetensors
GGUF
llama
chatbot
multilingual
arabic
french
tamazight
english
conversational
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use kaisser/LLM-Maroc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kaisser/LLM-Maroc with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kaisser/LLM-Maroc") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kaisser/LLM-Maroc") model = AutoModelForCausalLM.from_pretrained("kaisser/LLM-Maroc", device_map="auto") 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
- llama.cpp
How to use kaisser/LLM-Maroc with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf kaisser/LLM-Maroc:BF16 # Run inference directly in the terminal: llama cli -hf kaisser/LLM-Maroc:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf kaisser/LLM-Maroc:BF16 # Run inference directly in the terminal: llama cli -hf kaisser/LLM-Maroc:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf kaisser/LLM-Maroc:BF16 # Run inference directly in the terminal: ./llama-cli -hf kaisser/LLM-Maroc:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf kaisser/LLM-Maroc:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf kaisser/LLM-Maroc:BF16
Use Docker
docker model run hf.co/kaisser/LLM-Maroc:BF16
- LM Studio
- Jan
- vLLM
How to use kaisser/LLM-Maroc with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kaisser/LLM-Maroc" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kaisser/LLM-Maroc", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kaisser/LLM-Maroc:BF16
- SGLang
How to use kaisser/LLM-Maroc 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 "kaisser/LLM-Maroc" \ --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": "kaisser/LLM-Maroc", "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 "kaisser/LLM-Maroc" \ --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": "kaisser/LLM-Maroc", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use kaisser/LLM-Maroc with Ollama:
ollama run hf.co/kaisser/LLM-Maroc:BF16
- Unsloth Desktop
- Docker Model Runner
How to use kaisser/LLM-Maroc with Docker Model Runner:
docker model run hf.co/kaisser/LLM-Maroc:BF16
- Lemonade
How to use kaisser/LLM-Maroc with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull kaisser/LLM-Maroc:BF16
Run and chat with the model
lemonade run user.LLM-Maroc-BF16
List all available models
lemonade list
- Atomic Chat
| set(LLAMA_VERSION 0.0.5923) | |
| set(LLAMA_BUILD_COMMIT d6fb3f6b) | |
| set(LLAMA_BUILD_NUMBER 5923) | |
| set(LLAMA_SHARED_LIB OFF) | |
| ####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### | |
| ####### Any changes to this file will be overwritten by the next CMake run #### | |
| ####### The input file was llama-config.cmake.in ######## | |
| get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) | |
| macro(set_and_check _var _file) | |
| set(${_var} "${_file}") | |
| if(NOT EXISTS "${_file}") | |
| message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") | |
| endif() | |
| endmacro() | |
| macro(check_required_components _NAME) | |
| foreach(comp ${${_NAME}_FIND_COMPONENTS}) | |
| if(NOT ${_NAME}_${comp}_FOUND) | |
| if(${_NAME}_FIND_REQUIRED_${comp}) | |
| set(${_NAME}_FOUND FALSE) | |
| endif() | |
| endif() | |
| endforeach() | |
| endmacro() | |
| #################################################################################### | |
| set_and_check(LLAMA_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include") | |
| set_and_check(LLAMA_LIB_DIR "${PACKAGE_PREFIX_DIR}/lib") | |
| set_and_check(LLAMA_BIN_DIR "${PACKAGE_PREFIX_DIR}/bin") | |
| find_package(ggml REQUIRED HINTS ${LLAMA_LIB_DIR}/cmake) | |
| find_library(llama_LIBRARY llama | |
| REQUIRED | |
| HINTS ${LLAMA_LIB_DIR} | |
| NO_CMAKE_FIND_ROOT_PATH | |
| ) | |
| add_library(llama UNKNOWN IMPORTED) | |
| set_target_properties(llama | |
| PROPERTIES | |
| INTERFACE_INCLUDE_DIRECTORIES "${LLAMA_INCLUDE_DIR}" | |
| INTERFACE_LINK_LIBRARIES "ggml::ggml;ggml::ggml-base;" | |
| IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" | |
| IMPORTED_LOCATION "${llama_LIBRARY}" | |
| INTERFACE_COMPILE_FEATURES c_std_90 | |
| POSITION_INDEPENDENT_CODE ON) | |
| check_required_components(Llama) | |