documentation fixed

pull/64/head
Kye 1 year ago
parent 23be926f7a
commit f9d0ac5448

@ -90,18 +90,20 @@ nav:
- OmniModalAgent: "swarms/agents/omni_agent.md"
- Idea2Image: "swarms/agents/idea_to_image.md"
- swarms.models:
- Overview: "swarms/models/index.md"
- HuggingFaceLLM: "swarms/models/hf.md"
- Anthropic: "swarms/models/anthropic.md"
- OpenAI: "swarms/models/openai.md"
- Fuyu: "swarms/models/fuyu.md"
- Zephyr: "swarms/models/zephyr.md"
- Vilt: "swarms/models/vilt.md"
- Idefics: "swarms/models/idefics.md"
- BingChat: "swarms/models/bingchat.md"
- Kosmos: "swarms/models/kosmos.md"
- Nougat: "swarms/models/nougat.md"
- LayoutLMDocumentQA: "swarms/models/layoutlm_document_qa.md"
- Language:
- Overview: "swarms/models/index.md"
- HuggingFaceLLM: "swarms/models/hf.md"
- Anthropic: "swarms/models/anthropic.md"
- OpenAI: "swarms/models/openai.md"
- Zephyr: "swarms/models/zephyr.md"
- MultiModal:
- Fuyu: "swarms/models/fuyu.md"
- Vilt: "swarms/models/vilt.md"
- Idefics: "swarms/models/idefics.md"
- BingChat: "swarms/models/bingchat.md"
- Kosmos: "swarms/models/kosmos.md"
- Nougat: "swarms/models/nougat.md"
- LayoutLMDocumentQA: "swarms/models/layoutlm_document_qa.md"
- swarms.structs:
- Overview: "swarms/structs/overview.md"
- Workflow: "swarms/structs/workflow.md"

@ -78,3 +78,16 @@ class AbstractModel(ABC):
if self.start_time and self.end_time:
return self.end_time - self.start_time
return 0
def metrics(self) -> str:
_sec_to_first_token = self._sec_to_first_token()
_tokens_per_second = self._tokens_per_second()
_num_tokens = self._num_tokens(self.history)
_time_for_generation = self._time_for_generation(self.history)
return f"""
SEC TO FIRST TOKEN: {_sec_to_first_token}
TOKENS/SEC: {_tokens_per_second}
TOKENS: {_num_tokens}
Tokens/SEC: {_time_for_generation}
"""
Loading…
Cancel
Save