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 "Tamnemtf/llama-2-7b-vi-oscar_mini" \
    --host 0.0.0.0 \
    --port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "Tamnemtf/llama-2-7b-vi-oscar_mini",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
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 "Tamnemtf/llama-2-7b-vi-oscar_mini" \
        --host 0.0.0.0 \
        --port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "Tamnemtf/llama-2-7b-vi-oscar_mini",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

Model Details

  • Model Name: llama-2-7b-vi-oscar_mini
  • Purpose: Mục đích để train con model này để phục vụ việc học và đề tài nckh.
  • Availability: The model checkpoint can be accessed on Hugging Face: Tamnemtf/llama-2-7b-vi-oscar_mini
  • Model trên được train dựa trên model gốc là ngoan/Llama-2-7b-vietnamese-20k

How to Use

  # Run text generation pipeline with our next model
  prompt = "Canh chua cá lau là món gì ?"
  pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200)
  result = pipe(f"<s>[INST] {prompt} [/INST]")
  print(result[0]['generated_text'])

Conntact

nguyndantdm6@gmail.com

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

Model tree for Tamnemtf/llama-2-7b-vi-oscar_mini

Finetuned
(1)
this model

Datasets used to train Tamnemtf/llama-2-7b-vi-oscar_mini