Instructions to use TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ") 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
- vLLM
How to use TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ
- SGLang
How to use TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ 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 "TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ" \ --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": "TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ", "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 "TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ" \ --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": "TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/dolphin-2.5-mixtral-8x7b-GPTQ
Malware api call sequences embeddings
Hello,
I have a list of api call sequences from emulated malware logs, I want to classify the call sequences with their arguments, so I need embeddings. I chose this as this model can code.
I plan on using these embeddings in a Graph transformer, but my question is, how do i query get the model to generate embeddings for me.
Im using the feature extraction pipeline, but the issue is the context length, I have strings of API calls more than 3k in count. How would I make it work?
I'm pretty new to this so please dumb it down a little.
Any clues?
I'm trying to run the Mixtral models like dolphin here with the provided code, but it seems that it is not yet supported in transformers. I upgraded to the latest version as suggested (transformers-4.37.0.dev0) but it still gives me the following error
File /opt/conda/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py:566,
ValueError(
570 f"Unrecognized configuration class {config.class} for this kind of AutoModel: {cls.name}.\n"
571 f"Model type should be one of {', '.join(c.name for c in cls._model_mapping.keys())}."
572 )
...
/opt/conda/lib/python3.10/site-packages/auto_gptq/nn_modules/qlinear/qlinear_exllama.py:68, in QuantLinear.init(self, bits, group_size, infeatures, outfeatures, bias, trainable, **kwargs)
66 assert infeatures % 32 == 0
67 assert infeatures % self.group_size == 0
---> 68 assert outfeatures % 32 == 0
70 self.register_buffer(
71 'qweight',
72 torch.zeros((infeatures // 32 * self.bits, outfeatures), dtype=torch.int32)
73 )
74 self.register_buffer(
75 'qzeros',
76 torch.zeros((math.ceil(infeatures / self.group_size), outfeatures // 32 * self.bits), dtype=torch.int32)
77 )
AssertionError: