Instructions to use Deci/DeciLM-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Deci/DeciLM-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Deci/DeciLM-7B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Deci/DeciLM-7B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Deci/DeciLM-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Deci/DeciLM-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Deci/DeciLM-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Deci/DeciLM-7B
- SGLang
How to use Deci/DeciLM-7B 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 "Deci/DeciLM-7B" \ --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": "Deci/DeciLM-7B", "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 "Deci/DeciLM-7B" \ --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": "Deci/DeciLM-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Deci/DeciLM-7B with Docker Model Runner:
docker model run hf.co/Deci/DeciLM-7B
RuntimeError: cutlassF: no kernel found to launch
#3
by Manmax31 - opened
I attempted finetuning using DeciLM-7B as the model using PEFT and SFT.
After the peft model is created, during inference, I get the error RuntimeError: cutlassF: no kernel found to launch!
I am using TeslaV100 GPUs. I have tried the same with Mistral-7b and don't see any issues.
Here is my code:
quantization_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype="float16",
)
base_model_id="Deci/DeciLM-7B"
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
quantization_config=quantization_config,
device_map="auto",
torch_dtype="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
tokenizer.pad_token = tokenizer.eos_token
tokenizer.padding_side = "right"
ft_model = PeftModel.from_pretrained(
model, "finetuned_models/deci-7b-tuned-r32-a16"
)
pipe = pipeline("text-generation", model=ft_model, tokenizer=tokenizer)
outputs = pipe(
prompt,
max_new_tokens=800,
do_sample=True,
temperature=0.1,
return_full_text=False,
repetition_penalty=1.5,
num_beams=1,
no_repeat_ngram_size=3,
early_stopping=True,
)
print("\nOutput:", outputs[0]["generated_text"])
Hello,
This is because SDPA is not supported in your environment, this will likely be fixed in a future transformer version as the new version checks if SDPA is available.
Hopefully, that helps.
Thank you.
Is there a work around this for now?
try on A100 GPU, it worked for me