documentation fixed

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

@ -90,12 +90,14 @@ nav:
- OmniModalAgent: "swarms/agents/omni_agent.md" - OmniModalAgent: "swarms/agents/omni_agent.md"
- Idea2Image: "swarms/agents/idea_to_image.md" - Idea2Image: "swarms/agents/idea_to_image.md"
- swarms.models: - swarms.models:
- Language:
- Overview: "swarms/models/index.md" - Overview: "swarms/models/index.md"
- HuggingFaceLLM: "swarms/models/hf.md" - HuggingFaceLLM: "swarms/models/hf.md"
- Anthropic: "swarms/models/anthropic.md" - Anthropic: "swarms/models/anthropic.md"
- OpenAI: "swarms/models/openai.md" - OpenAI: "swarms/models/openai.md"
- Fuyu: "swarms/models/fuyu.md"
- Zephyr: "swarms/models/zephyr.md" - Zephyr: "swarms/models/zephyr.md"
- MultiModal:
- Fuyu: "swarms/models/fuyu.md"
- Vilt: "swarms/models/vilt.md" - Vilt: "swarms/models/vilt.md"
- Idefics: "swarms/models/idefics.md" - Idefics: "swarms/models/idefics.md"
- BingChat: "swarms/models/bingchat.md" - BingChat: "swarms/models/bingchat.md"

@ -78,3 +78,16 @@ class AbstractModel(ABC):
if self.start_time and self.end_time: if self.start_time and self.end_time:
return self.end_time - self.start_time return self.end_time - self.start_time
return 0 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