How to use from
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 "MehdiHosseiniMoghadam/AVA-Qwen1.5-7B-Chat" \
    --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": "MehdiHosseiniMoghadam/AVA-Qwen1.5-7B-Chat",
		"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 "MehdiHosseiniMoghadam/AVA-Qwen1.5-7B-Chat" \
        --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": "MehdiHosseiniMoghadam/AVA-Qwen1.5-7B-Chat",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Quick Links

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

AVA-Qwen1.5-7

Fine-Tuned Qwen1.5 7B Persian Large Language Model LLM / Persian Qwen1.5 7B

AVA-Qwen1.5 / Persian Qwen

This Repository Contains Documents for Fine-Tuned Qwen1.5 Persian Large Language Model(LLM) Called AVA-Qwen1.5

(Still in progress)


Dataset used:

To Be Done


Usage:

All models are hosted in HuggingFace, and here is the code for inference:

from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
import torch

model_name_or_id = "MehdiHosseiniMoghadam/AVA-Qwen1.5-7B-Chat"
model = AutoModelForCausalLM.from_pretrained(model_name_or_id, torch_dtype=torch.float16, device_map="auto", low_cpu_mem_usage=True, load_in_8bit=True)
tokenizer = AutoTokenizer.from_pretrained(model_name_or_id)

prompt = ''

prompt = f"### Human:{prompt}\n### Assistant:"


inputs = tokenizer(prompt, return_tensors="pt").to("cuda")

generation_config = GenerationConfig(
    do_sample=True,
    top_k=1,
    temperature=0.01,
    max_new_tokens=90,
    pad_token_id=tokenizer.eos_token_id
)


outputs = model.generate(**inputs, generation_config=generation_config)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

License

License

Released Jan 30, 2024 by Mehdi Hosseini Moghadam

Attention ⚠️: The user is responsible for using AVA-Llama-3 / Persian Llama 3

Any misuse of the model (of any kind) is the responsibility of the user and not the creator

Contact

Buy Me A Coffee

Buy Me A Coffee

Buy Me A Coffee

Downloads last month
18
Safetensors
Model size
8B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support