Instructions to use dataequity/DE-LM-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dataequity/DE-LM-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dataequity/DE-LM-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("dataequity/DE-LM-7B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dataequity/DE-LM-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dataequity/DE-LM-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": "dataequity/DE-LM-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dataequity/DE-LM-7B
- SGLang
How to use dataequity/DE-LM-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 "dataequity/DE-LM-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": "dataequity/DE-LM-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 "dataequity/DE-LM-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": "dataequity/DE-LM-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dataequity/DE-LM-7B with Docker Model Runner:
docker model run hf.co/dataequity/DE-LM-7B
DE-LM-7B
DE-LM-7B is a 7.04 billion parameter decoder-only text generation model, released under the Apache 2.0 license. This is an instruction tuned model built on top of Deci/DeciLM-7B fine-tuned for data filtering and API generation.
Model Description
- Language(s) (NLP): English
- License: Apache 2.0
Model Architecture
| Parameters | Layers | Heads | Sequence Length | GQA num_key_value_heads* |
|---|---|---|---|---|
| 7.04 billion | 32 | 32 | 8192 | Variable |
Uses
The model is intended for commercial and research use in English and can be fine-tuned for various tasks and languages.
How to Get Started with the Model
Use the code below to get started with the model.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "dataequity/DE-LM-7B"
device = "cuda" # for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", trust_remote_code=True).to(device)
inputs = tokenizer.encode("List the top 10 financial APIs", return_tensors="pt").to(device)
outputs = model.generate(inputs, max_new_tokens=100, do_sample=True, top_p=0.95)
print(tokenizer.decode(outputs[0]))
# The model can also be used via the text-generation pipeline interface
from transformers import pipeline
generator = pipeline("text-generation", "dataequity/DE-LM-7B", torch_dtype="auto", trust_remote_code=True, device=device)
outputs = generator("List the top 10 financial APIs", max_new_tokens=100, do_sample=True, top_p=0.95)
print(outputs[0]["generated_text"])
Ethical Considerations and Limitations
DE-LM-7B is a new technology that comes with inherent risks associated with its use. The testing conducted so far has been primarily in English and does not encompass all possible scenarios. Like those of all large language models, DE-LM-7B's outputs are unpredictable, and the model may generate responses that are inaccurate, biased, or otherwise objectionable. Consequently, developers planning to use DE-LM-7B should undertake thorough safety testing and tuning designed explicitly for their intended applications of the model before deployment.
Citation
@misc{DeciFoundationModels,
title = {DeciLM-7B},
author = {DeciAI Research Team},
year = {2023}
url={https://huggingface.co/Deci/DeciLM-7B},
}
- Downloads last month
- 4