Downloads · 30 days
15
5% of all-time downloads
AgoraX/Lumixion-e1-70k-fncall-qlora
Lumixion-e1-70k-fncall-qlora is a text generation model from AgoraX. Use it when you need the model to write or continue text. It is set up for transformers.
Lumixion is the first ever vast array of multi-modal function calling models easily available for usage. This is the first iteration finetuned on 70+ samples with qlora and many other optimizations. If you would like…
Downloads · 30 days
15
5% of all-time downloads
All-time downloads
322
Public
Parameters
9.7B
19.3 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors19.3 GB · 100%
From the Hugging Face model README
Lumixion is the first ever vast array of multi-modal function calling models easily available for usage. This is the first iteration finetuned on 70+ samples with qlora and many other optimizations. If you would like to work on real-world multi-modal AI join our discord: LINK

from transformers import AutoTokenizer, AutoModelForCausalLM
from transformers.generation import GenerationConfig
tokenizer = AutoTokenizer.from_pretrained("AgoraX/Lumixion-e1-70k-fncall-qlora",trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
"AgoraX/Lumixion-e1-70k-fncall-qlora", # path to the output directory
device_map="cuda",
trust_remote_code=True
).eval()
# 1st dialogue turn
query = tokenizer.from_list_format([
{'image': 'https://images.rawpixel.com/image_800/cHJpdmF0ZS9sci9pbWFnZXMvd2Vic2l0ZS8yMDIzLTA4L3Jhd3BpeGVsX29mZmljZV8xNV9waG90b19vZl9hX2RvZ19ydW5uaW5nX3dpdGhfb3duZXJfYXRfcGFya19lcF9mM2I3MDQyZC0zNWJlLTRlMTQtOGZhNy1kY2Q2OWQ1YzQzZjlfMi5qcGc.jpg'}, # Either a local path or an url
{'text': "What are the objects in the image? What animals are present? Are there any people in the image?"},
])
print("sending model to chat")
response, history = model.chat(tokenizer, query=query, history=None)
print(response)
## How to Get Started with the Model
[FUNCTION CALL]
{{
'type': 'object',
'properties': {{
'objects': {{
'type': 'array',
'description': 'The objects present in the image.',
'items': {{
'type': 'string',
'enum': ['dog', 'person', 'tree', 'path', 'sun']
}}
}},
'animals': {{
'type': 'array',
'description': 'The animals present in the image.',
'items': {{
'type': 'string',
'enum': ['dog']
}}
}},
'people': {{
'type': 'boolean',
'description': 'Whether there are people in the image.',
'enum': [true]
}}
}}
}}
[EXPECTED OUTPUT]
{{
'objects': ['dog', 'person', 'tree', 'path', 'sun'],
'animals': ['dog'],
'people': true
}}
from transformers import AutoTokenizer, AutoModelForCausalLM
from transformers.generation import GenerationConfig
tokenizer = AutoTokenizer.from_pretrained("qwen/Qwen-VL-Chat",trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
"MODEL_PATH_HERE", # path to the output directory
device_map="cuda",
trust_remote_code=True
).eval()
#model.generation_config = GenerationConfig.from_pretrained("Qwen/Qwen-VL-Chat", trust_remote_code=True)
# 1st dialogue turn
query = tokenizer.from_list_format([
{'image': 'https://images.rawpixel.com/image_800/cHJpdmF0ZS9sci9pbWFnZXMvd2Vic2l0ZS8yMDIzLTA4L3Jhd3BpeGVsX29mZmljZV8xNV9waG90b19vZl9hX2RvZ19ydW5uaW5nX3dpdGhfb3duZXJfYXRfcGFya19lcF9mM2I3MDQyZC0zNWJlLTRlMTQtOGZhNy1kY2Q2OWQ1YzQzZjlfMi5qcGc.jpg'}, # Either a local path or an url
{'text': "What are the objects in the image? What animals are present? Are there any people in the image?"},
])
print("sending model to chat")
response, history = model.chat(tokenizer, query=query, history=None)
print(response)
[FUNCTION CALL]
{{
'type': 'object',
'properties': {{
'objects': {{
'type': 'array',
'description': 'The objects present in the image.',
'items': {{
'type': 'string',
'enum': ['dog', 'person', 'tree', 'path', 'sun']
}}
}},
'animals': {{
'type': 'array',
'description': 'The animals present in the image.',
'items': {{
'type': 'string',
'enum': ['dog']
}}
}},
'people': {{
'type': 'boolean',
'description': 'Whether there are people in the image.',
'enum': [true]
}}
}}
}}
[EXPECTED OUTPUT]
{{
'objects': ['dog', 'person', 'tree', 'path', 'sun'],
'animals': ['dog'],
'people': true
}}
Just send an image and ask a question in the text.
(recommended) transformers >= 4.32.0
query = tokenizer.from_list_format([
{'image': 'https://images.rawpixel.com/image_800/cHJpdmF0ZS9sci9pbWFnZXMvd2Vic2l0ZS8yMDIzLTA4L3Jhd3BpeGVsX29mZmljZV8xNV9waG90b19vZl9hX2RvZ19ydW5uaW5nX3dpdGhfb3duZXJfYXRfcGFya19lcF9mM2I3MDQyZC0zNWJlLTRlMTQtOGZhNy1kY2Q2OWQ1YzQzZjlfMi5qcGc.jpg'}, # Either a local path or an url
{'text': "QUESTIONS/QUERIES GO HERE"},
])
Custom Function Calling Dataset with 70k examples
qlora for 3 epochs