Git Product home page Git Product logo

Comments (4)

tonylins avatar tonylins commented on July 20, 2024

Hi, thanks for reaching out. At the first glance, the model just use the LlamaForCausalLM class, so the current codebase should be able to support it. Have you tried applying it to the model and see if it works? Thanks!

from llm-awq.

tonylins avatar tonylins commented on July 20, 2024

Actually, people tried applying the codebase to another salesforce model here #32 , which turns out to work.

from llm-awq.

casper-hansen avatar casper-hansen commented on July 20, 2024

XGen is a LLaMa model and is already supported. Posting an easy-to-use script here for you to get started. Note that this assumes you have:

  1. built AWQ
  2. pip install tiktoken
  3. the following script in the llm-awq directory

On a 3090, I am getting 76 tokens/s with this model.

hfuser="Salesforce"
model_name="xgen-7b-8k-inst"
group_size=128
repo_path="$hfuser/$model_name"
model_path="/workspace/llm-awq/$model_name"
search_result_path="/workspace/llm-awq/$model_name/$model_name-awq-search.pt"
quantized_model_path="/workspace/llm-awq/$model_name/$model_name-w4-g$group_size.pt"

git clone https://huggingface.co/$repo_path

python3 -m awq.entry --model_path $model_path \
    --w_bit 4 --q_group_size $group_size \
    --run_awq --dump_awq $search_result_path

python3 -m awq.entry --model_path $model_path \
    --w_bit 4 --q_group_size $group_size \
    --load_awq $search_result_path \
    --q_backend real \
    --dump_quant $quantized_model_path

cd tinychat

python3 demo.py --model_type llama \
    --model_path $model_path \
    --q_group_size $group_size \
    --load_quant $quantized_model_path \
    --precision W4A16

from llm-awq.

cmxiong avatar cmxiong commented on July 20, 2024

Great, thanks so much.

from llm-awq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.