Skip to content

Commit

Permalink
fix: merge gpu arch and os tensorrt models (#3299)
Browse files Browse the repository at this point in the history
Signed-off-by: James <namnh0122@gmail.com>
  • Loading branch information
namchuai authored Aug 7, 2024
1 parent 6020979 commit aa7dbdc
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions web/utils/huggingface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,22 @@ export const getEngineAndBranches = async (
continue
}
if (branch.includes('tensorrt-llm')) {
const fileSize = await getFileSizeByRepoAndBranch(name, branch)
engineToBranches.tensorrtllm.push({
name: branch,
fileSize: fileSize,
})
const mergedBranchName = branch.split('-').slice(0, -2).join('-')
let isAlreadyAdded = false
// check if the branch is already added
for (const branch of engineToBranches.tensorrtllm) {
if (branch.name.includes(mergedBranchName)) {
isAlreadyAdded = true
break
}
}
if (!isAlreadyAdded) {
const fileSize = await getFileSizeByRepoAndBranch(name, branch)
engineToBranches.tensorrtllm.push({
name: mergedBranchName,
fileSize: fileSize,
})
}
continue
}
}
Expand Down

0 comments on commit aa7dbdc

Please sign in to comment.